Skip to main content
Glama

editor_validate_assets

Validate assets in Unreal Engine projects to identify errors, check asset status, and generate detailed validation reports with error details.

Instructions

Validate assets in the project to check for errors

Example output: {'total_validated': 100, 'valid_assets': [{'path': '/Game/Meshes/SM_Cube', 'class': 'StaticMesh', 'size': '1024'}], 'invalid_assets': [{'path': '/Game/Missing/Asset', 'error': 'Asset does not exist'}], 'validation_summary': {'valid_count': 95, 'invalid_count': 5, 'success_rate': 95.0}}

Returns validation results with asset status and error details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
asset_pathsNo

Implementation Reference

  • Main handler function that validates assets: checks existence, loads them, validates data, collects valid/invalid lists and summary statistics.
    def validate_assets(
        asset_paths: Optional[Union[str, List[str]]] = None,
    ) -> Dict[str, Any]:
        validation_results = {
            "total_validated": 0,
            "valid_assets": [],
            "invalid_assets": [],
            "validation_summary": {},
        }
    
        if asset_paths:
            assets_to_validate = (
                asset_paths if isinstance(asset_paths, list) else [asset_paths]
            )
        else:
            asset_registry = unreal.AssetRegistryHelpers.get_asset_registry()
            all_assets = asset_registry.get_all_assets()
            assets_to_validate = [
                str(asset.package_path) + "/" + str(asset.asset_name)
                for asset in all_assets[:100]
            ]  # Limit to 100 for performance
    
        validation_results["total_validated"] = len(assets_to_validate)
    
        for asset_path in assets_to_validate:
            try:
                if not unreal.EditorAssetLibrary.does_asset_exist(asset_path):
                    validation_results["invalid_assets"].append(
                        {"path": asset_path, "error": "Asset does not exist"}
                    )
                    continue
    
                asset = unreal.EditorAssetLibrary.load_asset(asset_path)
                if not asset:
                    validation_results["invalid_assets"].append(
                        {"path": asset_path, "error": "Failed to load asset"}
                    )
                    continue
    
                asset_data = unreal.EditorAssetLibrary.find_asset_data(asset_path)
                if not asset_data.is_valid():
                    validation_results["invalid_assets"].append(
                        {"path": asset_path, "error": "Asset data is invalid"}
                    )
                    continue
    
                validation_results["valid_assets"].append(
                    {
                        "path": asset_path,
                        "class": asset.get_class().get_name(),
                        "size": asset_data.get_tag_value("AssetFileSize") or "Unknown",
                    }
                )
    
            except Exception as e:
                validation_results["invalid_assets"].append(
                    {"path": asset_path, "error": str(e)}
                )
    
        # Generate summary
        validation_results["validation_summary"] = {
            "valid_count": len(validation_results["valid_assets"]),
            "invalid_count": len(validation_results["invalid_assets"]),
            "success_rate": round(
                len(validation_results["valid_assets"])
                / validation_results["total_validated"]
                * 100,
                2,
            )
            if validation_results["total_validated"] > 0
            else 0,
        }
    
        return validation_results
  • Helper function that templates the Python script with asset_paths parameter for execution via tryRunCommand.
    export const UEValidateAssets = (asset_paths?: string) =>
    	Template(read("./scripts/ue_validate_assets.py"), {
    		asset_paths: asset_paths || "",
    	})
  • Registers the 'editor_validate_assets' tool with MCP server, including description, schema, and handler that delegates to editorTools.UEValidateAssets
    server.tool(
    	"editor_validate_assets",
    	"Validate assets in the project to check for errors\n\nExample output: {'total_validated': 100, 'valid_assets': [{'path': '/Game/Meshes/SM_Cube', 'class': 'StaticMesh', 'size': '1024'}], 'invalid_assets': [{'path': '/Game/Missing/Asset', 'error': 'Asset does not exist'}], 'validation_summary': {'valid_count': 95, 'invalid_count': 5, 'success_rate': 95.0}}\n\nReturns validation results with asset status and error details.",
    	{
    		asset_paths: z.string().optional(),
    	},
    	async ({ asset_paths }) => {
    		const result = await tryRunCommand(editorTools.UEValidateAssets(asset_paths))
    		return {
    			content: [
    				{
    					type: "text",
    					text: result,
    				},
    			],
    		}
    	},
    )
  • Zod input schema defining optional asset_paths as string (likely comma-separated or single path).
    {
    	asset_paths: z.string().optional(),
    },
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 that the tool performs validation and returns results with status and error details, which is useful. However, it doesn't cover behavioral traits such as whether it's read-only, destructive, requires specific permissions, or has performance implications (e.g., time-intensive for large projects). The example output adds some context but isn't comprehensive.

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, starting with the core purpose. The example output and return statement add value without being redundant. However, the example output is detailed and might be slightly verbose, but it earns its place by clarifying the response format.

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 complexity (validation with potential errors), no annotations, no output schema, and low schema coverage, the description is moderately complete. It explains what the tool does and shows an output example, but it lacks details on parameters, behavioral constraints, and usage context, making it adequate but with clear gaps for effective agent use.

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

Parameters2/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, and the description doesn't mention any parameters. It fails to explain 'asset_paths', such as its format, whether it's optional or required, or how to specify multiple paths. This leaves a significant gap in understanding how to invoke the tool effectively.

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: 'Validate assets in the project to check for errors.' It specifies the verb ('validate') and resource ('assets in the project'), making it understandable. However, it doesn't explicitly differentiate from siblings like 'editor_get_asset_info' or 'editor_list_assets', which might also involve asset inspection, so it misses full sibling distinction.

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, context (e.g., after asset creation or before export), or exclusions. With many sibling tools like 'editor_get_asset_info' or 'editor_search_assets', this lack of comparative guidance leaves usage ambiguous.

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