Skip to main content
Glama

editor_export_asset

Export Unreal Engine assets to text format for external use or backup. Provide the asset path to retrieve raw binary content.

Instructions

Export an Unreal asset to text

Example output: Binary data of the exported asset file

Returns the raw binary content of the exported asset.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
asset_pathYes

Implementation Reference

  • Registers the 'editor_export_asset' MCP tool, including description, input schema {asset_path: z.string()}, and inline handler function.
    server.tool(
    	"editor_export_asset",
    	"Export an Unreal asset to text\n\nExample output: Binary data of the exported asset file\n\nReturns the raw binary content of the exported asset.",
    	{
    		asset_path: z.string(),
    	},
    	async ({ asset_path }) => {
    		const result = await tryRunCommand(editorTools.UEExportAsset(asset_path))
    		return {
    			content: [
    				{
    					type: "text",
    					text: result,
    				},
    			],
    		}
    	},
    )
  • The handler function that runs the templated Python command via tryRunCommand(UEExportAsset(asset_path)) and returns the result as text content.
    async ({ asset_path }) => {
    	const result = await tryRunCommand(editorTools.UEExportAsset(asset_path))
    	return {
    		content: [
    			{
    				type: "text",
    				text: result,
    			},
    		],
    	}
    },
  • Zod schema defining the input parameter 'asset_path' as a string.
    	asset_path: z.string(),
    },
  • Helper function that loads and templates the ue_export_asset.py script with the asset_path parameter.
    export const UEExportAsset = (asset_path: string) => Template(read("./scripts/ue_export_asset.py"), { asset_path })
  • Core Python implementation that exports the Unreal asset to binary data using EditorAssetLibrary.load_asset and Exporter.run_asset_export_task, then outputs the raw bytes.
    import unreal
    import sys
    import tempfile
    
    
    def export_asset(asset_path: str) -> bytes:
        asset = unreal.EditorAssetLibrary.load_asset(asset_path)
    
        if not asset:
            raise ValueError(f"Asset not found at {asset_path}")
    
        export_task = unreal.AssetExportTask()
        export_task.automated = True
        export_task.prompt = False
        export_task.replace_identical = True
        export_task.exporter = None
        export_task.object = asset
    
        temp_file = tempfile.NamedTemporaryFile(delete=True, suffix=".uasset.copy")
    
        export_file_path = temp_file.name
    
        export_task.filename = export_file_path
    
        result = unreal.Exporter.run_asset_export_task(export_task)
    
        if not result:
            raise RuntimeError(
                f"Failed to export asset {asset.get_name()} to {export_file_path}"
            )
    
        file = open(export_file_path, "rb")
        data = file.read()
        file.close()
        temp_file.close()
        return data
    
    
    def main():
        data = export_asset("${asset_path}")
        sys.stdout.buffer.write(data)
    
    
    if __name__ == "__main__":
        main()
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It states the tool exports an asset and returns raw binary content, which implies a read operation, but doesn't disclose critical behaviors: whether it requires specific permissions, if it modifies the asset (likely not, but unclear), rate limits, error handling, or output format details beyond 'binary data'. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded: the first sentence states the purpose clearly, followed by example output and return details. There's minimal waste, though the second and third sentences are somewhat redundant ('Example output' and 'Returns' convey similar information). Overall, it's efficient but could be slightly tighter.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 1 parameter with 0% schema coverage, no annotations, and no output schema, the description is incomplete. It explains what the tool does and the return type, but lacks parameter semantics, behavioral context (e.g., permissions, errors), and doesn't leverage sibling context for guidance. For a tool in a complex Unreal editor environment, this leaves too many unknowns for effective agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description doesn't mention the parameter 'asset_path' at all. It adds no meaning beyond the schema, which only defines 'asset_path' as a required string. However, with 1 parameter and no schema descriptions, the baseline is 3 as the description doesn't compensate for the coverage gap but also doesn't mislead; it simply omits parameter details.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Export an Unreal asset to text' (verb+resource). It distinguishes from siblings like editor_get_asset_info (info retrieval) or editor_list_assets (listing), but doesn't explicitly differentiate from all alternatives (e.g., editor_export_asset vs. editor_search_assets). The purpose is specific and actionable, though not fully sibling-distinguished.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., asset must exist), exclusions (e.g., not for binary assets), or compare to siblings like editor_get_asset_info for metadata. Usage is implied only by the purpose statement, with no explicit context or alternatives named.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/runreal/unreal-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server