Skip to main content
Glama

scene_tree

Inspect a scene hierarchy as compact indented text with GUIDs, names, visibility, and component types before querying detailed parameters, avoiding verbose JSON.

Instructions

把场景结构输出成紧凑的缩进文本:渲染组,以及每个对象的 guid、名称、是否隐藏、组件类型。比官方 get_scene 的 JSON 好读,适合先摸清结构再用 inspect_many 查参数;要渲染组和对象的完整 JSON 用 get_scene。subtree 只看某个对象(guid 或名称),depth 控制展开层数(默认 6);没展开的子对象会注明数量。传 project_dir(工程目录,如 works_download 下载的作品)时不需要打开窗口,直接读 Assets/main.scene 和 main.scene.extra,对象写成 #序号,组件类型和窗口里显示的一致(编辑器数据缺失时退回场景文件里的名称);没有渲染组这一层,渲染组本身作为根对象列出。save_to 是目录的绝对路径,结果另存为其中的 scene_tree.txt,长期保留。

Input Schema

NameRequiredDescriptionDefault
depthNo展开层数,默认 6。
save_toNo另存到这个目录(绝对路径,不存在会创建),长期保留。
subtreeNo只输出这个对象及其子对象(guid 或名称;project_dir 时用 #序号 或名称)。
instance_idNo官方 list_instances 返回的 instance_id,与 project_path 二选一。
project_dirNo不开窗口、直接读这个工程目录的场景文件;给了它就不看 project_path / instance_id。
project_pathNo目标工程的绝对路径。与 instance_id 二选一;只开了一个工程窗口时都可省略。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and delivers: project_dir mode works without an open window by reading Assets/main.scene and main.scene.extra, objects are renumbered as #index, the render-group layer disappears and groups become root objects, component names fall back to scene-file names when editor data is missing, and unexpanded children are annotated with counts. save_to is disclosed as a persistent side effect that creates the directory.

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 most important comparison (versus get_scene) is front-loaded and the parameter notes follow in the order an agent would consult them. It is dense but nearly every clause carries new information; only the project_dir passage is long enough to be slightly hard to parse on first read.

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

Completeness5/5

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

For a 6-parameter tool with no annotations and no output schema, the description still tells the agent what the output looks like (indented text per object), what a truncated tree looks like, and what session prerequisites each mode needs. Nothing an agent needs in order to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description earns extra credit by adding meaning the schema lacks, notably that save_to writes a file named scene_tree.txt inside the given directory and how subtree accepts #index or name in project_dir mode. It does not, however, explain the interplay or precedence among project_path and instance_id beyond what the schema already says.

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 opening states a specific verb and output form (indented compact text) and enumerates exactly what each line contains: render group, guid, name, hidden flag, component types. It explicitly distinguishes itself from get_scene (full JSON) and inspect_many (parameter lookup), so an agent can pick the right tool without opening schemas.

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 gives an explicit recommended workflow (survey structure first, then inspect_many for parameters), names the alternative for full JSON (get_scene), and routes single-object exploration to the subtree parameter. Both the when-to-use and the when-not-to-use are spelled out.

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