Skip to main content
Glama

editor_get_asset_references

Find assets that reference a specified asset in Unreal Engine to track dependencies and manage project structure.

Instructions

Get references for an asset

Example output: [{'name': '/Game/Materials/M_Character.M_Character', 'class': 'Material'}, {'name': '/Game/Blueprints/BP_Player.BP_Player', 'class': 'Blueprint'}]

Returns list of assets that reference the specified asset.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
asset_pathYes

Implementation Reference

  • Registers the MCP tool 'editor_get_asset_references' including name, description, input schema { asset_path: z.string() }, and thin wrapper handler that executes the Python command via tryRunCommand.
    server.tool(
    	"editor_get_asset_references",
    	"Get references for an asset\n\nExample output: [{'name': '/Game/Materials/M_Character.M_Character', 'class': 'Material'}, {'name': '/Game/Blueprints/BP_Player.BP_Player', 'class': 'Blueprint'}]\n\nReturns list of assets that reference the specified asset.",
    	{ asset_path: z.string() },
    	async ({ asset_path }) => {
    		const result = await tryRunCommand(editorTools.UEGetAssetReferences(asset_path))
    
    		return {
    			content: [
    				{
    					type: "text",
    					text: result,
    				},
    			],
    		}
    	},
    )
  • Helper function that templates the Python script ue_get_asset_references.py with the asset_path parameter and returns the command string for execution.
    export const UEGetAssetReferences = (asset_path: string) =>
    	Template(read("./scripts/ue_get_asset_references.py"), { asset_path })
  • The Python handler script that implements the core logic: uses Unreal AssetRegistry to find referencers of the given asset_path, extracts class and name, and outputs JSON list of referencing assets.
    from typing import List, Dict
    import unreal
    import json
    
    
    def get_asset_references(asset_path: str) -> List[Dict[str, str]]:
        asset_registry = unreal.AssetRegistryHelpers.get_asset_registry()
    
        asset_data = asset_registry.get_asset_by_object_path(asset_path)
    
        referencing_assets = asset_registry.get_referencers(
            asset_data.package_name, unreal.AssetRegistryDependencyOptions()
        )
    
        asset_paths = []
        for referencer in referencing_assets:
            assets = asset_registry.get_assets_by_package_name(referencer)
            for asset in assets:
                [asset_class, asset_name] = asset.get_full_name().split(" ", 1)
                asset_paths.append({"name": asset_name, "class": asset_class})
    
        return asset_paths
    
    
    def main():
        references = get_asset_references("${asset_path}")
        print(json.dumps(references))
    
    
    if __name__ == "__main__":
        main()
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool returns a list of referencing assets, which implies a read-only operation, but doesn't cover critical aspects like error handling (e.g., if the asset_path is invalid), performance considerations (e.g., speed for large assets), or output format details beyond the example. The example output adds some context but doesn't fully describe 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 with three sentences: a purpose statement, an example output, and a clarification of the return value. It's front-loaded with the core purpose, and the example is relevant but could be integrated more seamlessly. There's no wasted text, though the structure could be slightly tighter by merging sentences.

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

Completeness3/5

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

Given the tool's moderate complexity (1 parameter, no output schema, no annotations), the description is partially complete. It covers the basic purpose and output format via example, but lacks details on parameter usage, error cases, and behavioral traits. For a read-only query tool, this is adequate but has clear gaps, such as not explaining how to interpret the output or handle edge cases.

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?

The input schema has 1 parameter with 0% description coverage, so the description must compensate. It mentions 'specified asset' in relation to asset_path, implying the parameter identifies the target asset, but doesn't explain the format (e.g., Unreal Engine path syntax like '/Game/...') or constraints. The description adds minimal meaning beyond the schema, partially compensating for the low coverage but leaving gaps.

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 verb 'Get' and resource 'references for an asset', making the purpose specific and understandable. It distinguishes from siblings like editor_get_asset_info or editor_list_assets by focusing on reference relationships rather than asset properties or listings. However, it doesn't explicitly contrast with all siblings, such as editor_search_assets, which might also involve asset relationships.

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, such as needing the asset to exist, or compare it to siblings like editor_get_asset_info for asset details or editor_search_assets for broader queries. The example output implies usage for dependency analysis, but this is not stated explicitly.

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