Skip to main content
Glama

editor_get_asset_info

Retrieve asset metadata and LOD details for StaticMesh and SkeletalMesh assets in Unreal Engine to analyze mesh properties and structure.

Instructions

Get information about an asset, including LOD levels for StaticMesh and SkeletalMesh assets

Example output: [{'name': 'SM_Cube', 'is_valid': True, 'is_u_asset': True, 'is_asset_loaded': True, 'class': 'StaticMesh', 'path': '/Game/Meshes/SM_Cube', 'package': 'SM_Cube', 'package_path': '/Game/Meshes/SM_Cube', 'lod_levels': [{'lod_index': 0, 'num_vertices': 24, 'num_triangles': 12}, {'lod_index': 1, 'num_vertices': 16, 'num_triangles': 8}]}]

Returns asset metadata with LOD information for mesh assets.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
asset_pathYes

Implementation Reference

  • Core handler logic in Python script executed by Unreal Editor. Retrieves asset metadata including LOD levels for StaticMesh and SkeletalMesh using Unreal Python API.
    from typing import List, Dict, Any
    import unreal
    import json
    
    
    def get_asset_info(asset_path: str) -> List[Dict[str, Any]]:
        asset = unreal.EditorAssetLibrary.find_asset_data(asset_path)
        if asset.is_valid():
            asset_data = asset.get_asset()
            asset_info = {
                "name": asset_data.get_name(),
                "is_valid": asset.is_valid(),
                "is_u_asset": asset.is_u_asset(),
                "is_asset_loaded": asset.is_asset_loaded(),
                "class": asset_data.get_class().get_name(),
                "path": asset_data.get_path_name(),
                "package": asset_data.get_package().get_name(),
                "package_path": asset_data.get_package().get_path_name(),
            }
    
            # Add LOD information for assets that support it
            lod_info = get_lod_info(asset_data)
            if lod_info:
                asset_info["lod_levels"] = lod_info
    
            return [asset_info]
        else:
            return []
    
    
    def get_lod_info(asset_data) -> List[Dict[str, Any]]:
        lod_levels = []
    
        try:
            if isinstance(asset_data, unreal.StaticMesh):
                num_lods = asset_data.get_num_lods()
                for i in range(num_lods):
                    lod_data = asset_data.get_render_data().lod_resources[i]
                    lod_info = {
                        "lod_index": i,
                        "num_vertices": lod_data.get_num_vertices(),
                        "num_triangles": lod_data.get_num_triangles(),
                    }
                    lod_levels.append(lod_info)
    
            elif isinstance(asset_data, unreal.SkeletalMesh):
                editor_subsystem = unreal.get_editor_subsystem(
                    unreal.SkeletalMeshEditorSubsystem
                )
                if editor_subsystem:
                    try:
                        lod_count = editor_subsystem.get_lod_count(asset_data)
                        for lod_index in range(lod_count):
                            try:
                                lod_info_data = editor_subsystem.get_lod_info(
                                    asset_data, lod_index
                                )
                                lod_data = {
                                    "lod_index": lod_index,
                                    "lod_info": str(lod_info_data)
                                    if lod_info_data
                                    else None,
                                }
                                lod_levels.append(lod_data)
                            except Exception:
                                lod_data = {
                                    "lod_index": lod_index,
                                    "lod_info": None,
                                }
                                lod_levels.append(lod_data)
                    except Exception:
                        pass
    
        except Exception as e:
            # If we can't get LOD info, return empty list
            pass
    
        return lod_levels
    
    
    def main():
        asset_info = get_asset_info("${asset_path}")
        print(json.dumps(asset_info))
    
    
    if __name__ == "__main__":
        main()
  • Registers the 'editor_get_asset_info' tool in the MCP server, defines input schema { asset_path: z.string() }, and provides wrapper handler that executes the templated Python command.
    server.tool(
    	"editor_get_asset_info",
    	"Get information about an asset, including LOD levels for StaticMesh and SkeletalMesh assets\n\nExample output: [{'name': 'SM_Cube', 'is_valid': True, 'is_u_asset': True, 'is_asset_loaded': True, 'class': 'StaticMesh', 'path': '/Game/Meshes/SM_Cube', 'package': 'SM_Cube', 'package_path': '/Game/Meshes/SM_Cube', 'lod_levels': [{'lod_index': 0, 'num_vertices': 24, 'num_triangles': 12}, {'lod_index': 1, 'num_vertices': 16, 'num_triangles': 8}]}]\n\nReturns asset metadata with LOD information for mesh assets.",
    	{ asset_path: z.string() },
    	async ({ asset_path }) => {
    		const result = await tryRunCommand(editorTools.UEGetAssetInfo(asset_path))
    		return {
    			content: [
    				{
    					type: "text",
    					text: result,
    				},
    			],
    		}
    	},
    )
  • Helper function that reads the ue_get_asset_info.py script and applies Template with asset_path parameter to generate the Python code string for execution.
    export const UEGetAssetInfo = (asset_path: string) => Template(read("./scripts/ue_get_asset_info.py"), { asset_path })
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 returns asset metadata with LOD information for mesh assets, which is helpful, but it doesn't disclose critical behavioral traits such as whether it requires specific permissions, if it's read-only or has side effects, error handling, or performance characteristics. The example output adds some context but doesn't cover behavioral aspects comprehensively.

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

Conciseness3/5

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

The description is moderately concise but could be improved. The first sentence clearly states the purpose, but the lengthy example output (which is useful) might be better placed elsewhere or summarized. The final sentence reiterates the purpose, adding redundancy. Overall, it's front-loaded with key information but includes some repetitive elements.

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 complexity (a tool with 1 parameter, no annotations, and no output schema), the description is partially complete. It explains what information is returned (asset metadata with LOD details) and provides an example output, which helps understand the return format. However, it lacks details on parameters, error cases, and behavioral 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 (asset_path) with 0% description coverage, meaning the schema provides no semantic information. The description does not mention the asset_path parameter at all, failing to explain what it represents (e.g., a file path, asset name, or identifier) or its format. This leaves the parameter's meaning undocumented, which is a significant gap given the low schema coverage.

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: 'Get information about an asset, including LOD levels for StaticMesh and SkeletalMesh assets.' It specifies the verb ('Get information') and resource ('asset'), and distinguishes it from siblings like editor_list_assets (which lists assets) and editor_get_asset_references (which gets references). However, it doesn't explicitly differentiate from editor_get_map_info or editor_get_world_outliner, which are also info-getting tools but for different resources.

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 when to choose editor_get_asset_info over editor_search_assets (which might search for assets) or editor_list_assets (which lists assets), nor does it specify prerequisites or exclusions. The example output implies it's for retrieving detailed metadata, but no explicit usage context is given.

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