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
| Name | Required | Description | Default |
|---|---|---|---|
| match | No | How filter is matched against hierarchy/component identity fields | contains |
| query | Yes | What to query | |
| fields | No | Optional 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. | |
| filter | No | Optional filter (e.g., object name, path, or component type) | |
| refresh | No | Request live Unity data (default: true). Root, component-type, and exact-filter reads use a correlated targeted query; broader reads refresh the full snapshot. | |
| maxDepth | No | Maximum hierarchy depth; relative to rootPath when supplied | |
| rootPath | No | Exact hierarchy path to use as the query root | |
| timeoutMs | No | Maximum wait for an explicit Unity hierarchy export | |
| maxResults | No | Maximum hierarchy objects or components returned | |
| componentType | No | Exact short or full component type; hierarchy results retain only matching components | |
| propertyNames | No | Serialized 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. | |
| componentDetails | No | identity returns component types and IDs without serialized properties; incompatible with propertyNames. Use for component inventories. | properties |
| maxResponseBytes | No | UTF-8 byte budget including metadata: 16384-4194304, default 65536. A limit, not a minimum response size. | |
| includeDescendants | No | Include descendants of rootPath (default: false) |