Skip to main content
Glama

query_project_state

Query the live Unity scene hierarchy or components with targeted filters, depth limits, and field projections to inspect large scenes without exporting everything.

Instructions

Query the current Unity scene hierarchy or components. Hierarchy/component reads explicitly refresh a live Unity bridge, report snapshot freshness, and return bounded results. Use rootPath, exact matching, depth, component, and field projections for targeted inspection instead of requesting a whole large scene. Use search_unity_assets and get_prefab_catalog for their separately bounded asset and prefab results.

Requires the BanterMCPBridge Unity extension to be installed and Unity Editor running.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "query_project_state"
  }
}

Input Schema

NameRequiredDescriptionDefault
matchNoHow filter is matched against hierarchy/component identity fieldscontains
queryYesWhat to query
fieldsNoOptional returned fields. Hierarchy supports name, globalObjectId, path, active, layer, tag, depth, position, rotation, scale, localPosition, localRotation, localScale, and components; component queries support objectName, objectPath, depth, type, fullType, globalObjectId, and properties.
filterNoOptional filter (e.g., object name, path, or component type)
refreshNoRequest live Unity data (default: true). Root, component-type, and exact-filter reads use a correlated targeted query; broader reads refresh the full snapshot.
maxDepthNoMaximum hierarchy depth; relative to rootPath when supplied
rootPathNoExact hierarchy path to use as the query root
timeoutMsNoMaximum wait for an explicit Unity hierarchy export
maxResultsNoMaximum hierarchy objects or components returned
componentTypeNoExact short or full component type; hierarchy results retain only matching components
propertyNamesNoSerialized property names or paths, e.g. m_Enabled, m_Materials, m_Mass. Unreturned requests appear in missingProperties; absence is not false. Use fresh reads to verify snapshot gaps.
componentDetailsNoidentity returns component types and IDs without serialized properties; incompatible with propertyNames. Use for component inventories.properties
maxResponseBytesNoUTF-8 byte budget including metadata: 16384-4194304, default 65536. A limit, not a minimum response size.
includeDescendantsNoInclude descendants of rootPath (default: false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.7.7

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries real weight and does disclose non-obvious behavior: reads refresh a live bridge, snapshot freshness is reported, results are bounded, and the Unity Editor plus the bridge extension are required. It stops short of describing read-only guarantees, timeout/error behavior, or what happens when the bridge is unavailable, which the schema's timeoutMs hints at but never explains.

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?

Five short sentences, each front-loaded with the actionable constraint first (purpose, then refresh behavior, then narrowing guidance, then alternatives, then prerequisites). Dense but not padded; the prerequisite sentence could have been merged but nothing is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 14-parameter tool with no annotations and no output schema, the description covers purpose, prerequisites, bounding, and freshness reporting well. It does not explain result pagination or truncation indication (maxResults/maxResponseBytes behavior), which matters given the tool's breadth.

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%, so every parameter is already documented, and the description adds only a high-level pointer to the rootPath/match/depth/component/field family. It adds no syntax examples or cross-parameter interaction beyond what the schema states, so the baseline 3 applies.

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 opens with a specific verb and resource ('Query the current Unity scene hierarchy or components') and explicitly separates itself from search_unity_assets and get_prefab_catalog, which return different bounded data. An agent can pick this tool without opening the schema.

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?

It states when to use targeted inspection ('Use rootPath, exact matching, depth, component, and field projections... instead of requesting a whole large scene') and routes asset and prefab needs to named alternatives. It also states the precondition that the BanterMCPBridge extension must be installed and the Unity Editor running.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.