Skip to main content
Glama

editor_search_assets

Search for Unreal Engine assets by name, path, or class to locate specific files within your project.

Instructions

Search for assets by name or path with optional class filter

Example output: {'search_term': 'character', 'asset_class_filter': 'Blueprint', 'total_matches': 3, 'assets': [{'name': 'BP_Character', 'path': '/Game/Characters', 'class': 'Blueprint', 'package_name': 'BP_Character'}, {'name': 'BP_EnemyCharacter', 'path': '/Game/Enemies', 'class': 'Blueprint', 'package_name': 'BP_EnemyCharacter'}]}

Returns search results with asset details, limited to 50 results.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
search_termYes
asset_classNo

Implementation Reference

  • Core implementation of the asset search logic using Unreal Engine's AssetRegistry. Searches assets by name or path with optional class filter, sorts by relevance, limits to 50 results.
    def search_assets(
        search_term: str, asset_class: Optional[str] = None
    ) -> Dict[str, Any]:
        asset_registry = unreal.AssetRegistryHelpers.get_asset_registry()
        all_assets = asset_registry.get_all_assets()
    
        matching_assets = []
        search_term_lower = search_term.lower()
    
        for asset in all_assets:
            asset_name = str(asset.asset_name).lower()
            package_path = str(asset.package_path).lower()
            asset_class_name = str(asset.asset_class_path.asset_name).lower()
    
            name_match = search_term_lower in asset_name
            path_match = search_term_lower in package_path
    
            class_match = True
            if asset_class:
                class_match = asset_class.lower() in asset_class_name
    
            if (name_match or path_match) and class_match:
                matching_assets.append(
                    {
                        "name": str(asset.asset_name),
                        "path": str(asset.package_path),
                        "class": str(asset.asset_class_path.asset_name),
                        "package_name": str(asset.package_name),
                    }
                )
    
        def relevance_score(asset):
            name_exact = search_term_lower == asset["name"].lower()
            name_starts = asset["name"].lower().startswith(search_term_lower)
            return (name_exact * 3) + (name_starts * 2) + 1
    
        matching_assets.sort(key=relevance_score, reverse=True)
    
        return {
            "search_term": search_term,
            "asset_class_filter": asset_class,
            "total_matches": len(matching_assets),
            "assets": matching_assets[:50],  # Limit to 50 results
        }
  • Registers the 'editor_search_assets' tool with MCP server, including schema (search_term: string, asset_class: optional string) and thin wrapper handler that executes templated Python code via tryRunCommand.
    server.tool(
    	"editor_search_assets",
    	"Search for assets by name or path with optional class filter\n\nExample output: {'search_term': 'character', 'asset_class_filter': 'Blueprint', 'total_matches': 3, 'assets': [{'name': 'BP_Character', 'path': '/Game/Characters', 'class': 'Blueprint', 'package_name': 'BP_Character'}, {'name': 'BP_EnemyCharacter', 'path': '/Game/Enemies', 'class': 'Blueprint', 'package_name': 'BP_EnemyCharacter'}]}\n\nReturns search results with asset details, limited to 50 results.",
    	{
    		search_term: z.string(),
    		asset_class: z.string().optional(),
    	},
    	async ({ search_term, asset_class }) => {
    		const result = await tryRunCommand(editorTools.UESearchAssets(search_term, asset_class))
    		return {
    			content: [
    				{
    					type: "text",
    					text: result,
    				},
    			],
    		}
    	},
    )
  • Helper function that templates the ue_search_assets.py script with search parameters for execution in Unreal Editor.
    export const UESearchAssets = (search_term: string, asset_class?: string) =>
    	Template(read("./scripts/ue_search_assets.py"), {
    		search_term,
    		asset_class: asset_class || "",
    	})
Behavior3/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 discloses key behavioral traits: the tool returns search results with asset details, includes an example output format, and states a limitation ('limited to 50 results'). However, it doesn't cover other important aspects like performance implications, error handling, or whether it's read-only (though 'search' implies it).

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 clearly states the purpose. The example output and limitation note add value without unnecessary verbosity. However, the example output is detailed and could be simplified or moved to a separate section for better structure.

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 no annotations and no output schema, the description does a fair job: it explains the purpose, parameters, and includes an example output. However, it lacks details on error cases, performance, or integration with sibling tools. For a search tool with 2 parameters and behavioral constraints (50-result limit), more context would be helpful.

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%, so the schema provides no parameter details. The description compensates partially: it explains that 'search_term' is for searching by name or path and 'asset_class' is an optional filter. However, it doesn't specify format requirements (e.g., case sensitivity for 'asset_class') or provide examples of valid values, leaving gaps in understanding.

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: 'Search for assets by name or path with optional class filter.' It specifies the verb ('search'), resource ('assets'), and key parameters. However, it doesn't explicitly differentiate from sibling tools like 'editor_list_assets' or 'editor_get_asset_info,' which could have overlapping functionality.

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 sibling tools like 'editor_list_assets' (which might list all assets without filtering) or 'editor_get_asset_info' (which might retrieve details for a specific asset). There's no context about prerequisites, limitations, or when not to use this tool.

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