Skip to main content
Glama

assets-get-data

Retrieve detailed Unity asset data including serializable fields and properties from project files. Use after locating assets to access comprehensive information for development workflows.

Instructions

Get asset data from the asset file in the Unity project. It includes all serializable fields and properties of the asset. Use 'assets-find' tool to find asset before using this tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assetRefYesAsset reference. SCHEMA: {"assetPath":"Assets/path/to/asset"} or {"instanceID":12345} or {"assetGuid":"guid-string"}

Implementation Reference

  • The tool handler in the MCP server proxies calls to the Unity bridge via file-based IPC. The actual tool implementation is not statically defined in the Python code but is dispatched dynamically to the Unity Editor using the name passed in the `call_tool` function.
    def call_tool(name, arguments):
        """Execute a Unity Bridge tool via file IPC. Returns MCP content result."""
        bridge_dir = get_bridge_dir()
        commands_dir = os.path.join(bridge_dir, "commands")
        results_dir = os.path.join(bridge_dir, "results")
    
        # Heartbeat check
        err = check_heartbeat(bridge_dir)
        if err:
            return True, err
    
        # Write command
        command_id = f"{int(time.time())}-{uuid.uuid4().hex[:8]}"
        command = {"id": command_id, "tool": name, "params": arguments or {}}
    
        os.makedirs(commands_dir, exist_ok=True)
        os.makedirs(results_dir, exist_ok=True)
    
        command_file = os.path.join(commands_dir, f"{command_id}.json")
        write_atomic(command_file, json.dumps(command))
    
        # Poll for result
        result_file = os.path.join(results_dir, f"{command_id}.json")
        elapsed = 0.0
    
        while not os.path.exists(result_file):
            time.sleep(IPC_POLL_INTERVAL)
            elapsed += IPC_POLL_INTERVAL
            if elapsed >= IPC_TIMEOUT:
                try:
                    os.remove(command_file)
                except OSError:
                    pass
                return True, f"Timeout after {IPC_TIMEOUT}s waiting for Unity (tool: {name})"
    
        # Read result
        try:
            with open(result_file, "r", encoding="utf-8") as f:
                result = json.load(f)
        finally:
            try:
                os.remove(result_file)
            except OSError:
                pass
    
        is_error = result.get("status") != "success"
        message = result.get("message", "")
        return is_error, message
Behavior3/5

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

No annotations are provided, so the description carries full burden. It states the tool retrieves data (read operation) and mentions scope ('all serializable fields and properties'), but doesn't disclose behavioral aspects like error handling, performance characteristics, authentication needs, or rate limits. The description adds some context about what data is included but lacks comprehensive behavioral disclosure.

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

Conciseness5/5

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

Two sentences with zero waste. The first sentence states the core purpose, the second provides crucial usage guidance. Both sentences earn their place by adding distinct value. The description is appropriately sized and front-loaded with the main functionality.

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?

For a read operation with no annotations and no output schema, the description provides adequate purpose and usage guidance but lacks details about return format, error conditions, or performance characteristics. Given the complexity of retrieving 'all serializable fields and properties', more information about what constitutes 'asset data' would be helpful. The description is minimally complete but has clear gaps.

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 100%, so the schema already documents the single parameter 'assetRef' with its three possible formats. The description doesn't add any parameter-specific information beyond what's in the schema. With high schema coverage, baseline 3 is appropriate as the description doesn't enhance parameter 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 verb 'Get' and resource 'asset data', specifying it includes 'all serializable fields and properties of the asset'. It distinguishes from sibling 'assets-find' by indicating this tool retrieves detailed data after finding an asset. However, it doesn't explicitly differentiate from other data-retrieval tools like 'object-get-data' or 'scene-get-data'.

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

Usage Guidelines5/5

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

The description provides explicit guidance: 'Use assets-find tool to find asset before using this tool.' This clearly indicates a prerequisite workflow and distinguishes when to use this tool versus its sibling 'assets-find'. It establishes a clear sequence of operations.

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/butterlatte-zhang/unity-ai-bridge'

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