Skip to main content
Glama

unity_scene_hierarchy

Retrieve the full hierarchy tree of all GameObjects in the active Unity scene, including their components and children, with options to limit depth, node count, and filter by parent path.

Instructions

Get the full hierarchy tree of all GameObjects in the active scene, including their components and children.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxDepthNoMaximum depth to traverse (default: 10)
maxNodesNoMaximum total nodes to return (default: 5000). Use lower values for very large scenes to avoid timeouts.
parentPathNoOnly return hierarchy under this GameObject path (e.g. 'Canvas/Panel'). Useful for exploring specific subtrees in large scenes.
portNoTarget Unity instance port for parallel-safe routing. Get this from unity_select_instance. When working with multiple Unity instances, ALWAYS include this parameter.
Behavior3/5

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

No annotations are provided, so the description must carry the behavioral burden. It describes the output as the hierarchy tree including components and children, but does not disclose behavior like depth limits (maxDepth defaults to 10), node limits (maxNodes defaults to 5000), or that the tool is read-only. The description is adequate but lacks explicit safety or performance notes.

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 a single sentence that is concise and front-loaded with the primary purpose. It could be slightly more efficient by removing 'including their components and children' if that is implied by 'hierarchy tree', but overall it is well-structured and to the point.

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 that there is no output schema and the tool returns complex hierarchical data, the description does not specify the structure of the output (e.g., what fields each node contains). It also lacks guidance on performance for large scenes, which the schema's maxNode hint partially covers. The description is adequate but could be more complete.

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 coverage is 100%, meaning all parameters have descriptions. The description adds minimal additional meaning beyond what the schema provides, but it does not elaborate on parameter details. For example, it does not explain that 'parentPath' filters by path or that 'port' is for parallel-safe routing. Baseline 3 is appropriate since the schema already covers the parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool retrieves the 'full hierarchy tree of all GameObjects in the active scene, including their components and children.' The verb 'Get' combined with the resource 'hierarchy tree' precisely defines the purpose, and it is distinct from sibling tools like unity_scene_info, unity_gameobject_info, and unity_search_by_name.

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

Usage Guidelines4/5

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

The description does not explicitly state when not to use this tool, but the schema parameters provide guidance: 'parentPath' is described as useful for exploring specific subtrees, and 'maxNodes' suggests using lower values for very large scenes to avoid timeouts. No direct alternative tools are mentioned, but the context of exploring the hierarchy is clear.

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/AnkleBreaker-Studio/unity-mcp-server'

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