Mark, have you tried printing it from within a ssjs script tag?
Something like:
<script runat="server">print('%' + 'globals_asset_contents_raw:313081^with_get:rootNodes=' + %asset_metadata_assetIds% + '%');</script>
See: Problems with keyword replacement values as modifiers
Not sure if that’ll do the trick…