Skip to main content
Glama

scene

Destructive

Manage Godot scenes by reading, creating, editing, saving, querying, and instancing scene resources, nodes, and trees.

Instructions

场景操作。读取/创建: read_scene, create_scene, quick_scene。节点: add_node, batch_add_nodes, edit_node, remove_node。保存/资源: save_scene, load_sprite。查询: query_scene_tree, inspect_node。实例: instance_scene, set_instance_property, detach_instance。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo名称(create_3d_node)
saveNocommit: 是否保存到文件(默认 true)
typeNo类型(create_3d_node,白名单)
nodesNobatch_add_nodes: 节点定义数组
valueNo属性值(set_instance_property)
actionYes操作类型
parentNocreate_3d_node: 父节点路径(默认 root)
new_pathNosave_scene: 新保存路径(可选)/ merge_scene: theirs 场景路径(必需)
propertyNoset_instance_property: 属性名
max_depthNoquery_scene_tree/inspect_node: 最大遍历深度
node_nameNoadd_node: 节点名称
node_pathNoinspect_node/edit_node/remove_node/load_sprite/detach_instance/set_instance_property: 节点路径
node_typeNoadd_node: 节点类型(如 Sprite2D, Camera2D)
godot_pathNo覆盖 Godot 二进制路径(可选,优先于项目配置和环境变量)
operationsNocommit: 批量操作列表(enum 见 op 字段;铺设/TileSet 层配置/节点)
propertiesNoadd_node/edit_node/instance_scene: 属性对象
scene_pathNo场景路径(read_scene 用绝对路径,其余用相对项目路径)
script_pathNoquick_scene: 脚本路径(可选)
project_pathNoGodot 项目目录路径
summary_onlyNoread_scene: 返回摘要而非完整 JSON
texture_pathNoload_sprite: 纹理路径(如 res://assets/player.png)
instance_pathNo要实例化的场景(res://…tscn)
stop_on_errorNo遇错是否停止(默认 true;false 时失败不阻止后续与 .tres 写盘)
load_autoloadsNo是否加载 Autoload 上下文(默认 true)
root_node_nameNoquick_scene: 根节点名称(默认从文件名推导 PascalCase)
root_node_typeNocreate_scene/quick_scene: 根节点类型(默认 Node2D)
script_contentNoquick_scene: 脚本内容(脚本不存在时自动创建)
include_signalsNoinspect_node: 包含信号连接(默认 true)
parent_node_pathNoadd_node/instance_scene: 父节点路径(默认 root)
include_propertiesNoinspect_node: 包含属性值(默认 true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed21 schema fields changedv0.32.11
    • changedInput schema / properties / instance_path / description
      Previous value: -"instance_scene: 要实例化的场景文件(res://scenes/player.tscn)"New value: +"要实例化的场景(res://…tscn)"
    • changedInput schema / properties / name / description
      Previous value: -"create_3d_node: 节点名称"New value: +"名称(create_3d_node)"
    • changedInput schema / properties / operations / description
      Previous value: -"commit: 批量操作列表(tile_set/tile_fill/tile_erase/tile_clear/tileset_assign/node_property/node_add)"New value: +"commit: 批量操作列表(enum 见 op 字段;铺设/TileSet 层配置/节点)"
    • addedInput schema / properties / operations / items / properties / collision_layer
      Added value: +{
      +  "description": "物理层位掩码(physics add/set)",
      +  "type": "number"
      +}
    • addedInput schema / properties / operations / items / properties / collision_mask
      Added value: +{
      +  "description": "物理遮罩位掩码(physics add/set)",
      +  "type": "number"
      +}
    • addedInput schema / properties / operations / items / properties / layer
      Added value: +{
      +  "description": "layer 索引,0 起(physics set/remove、cdata set)",
      +  "type": "number"
      +}
    • addedInput schema / properties / operations / items / properties / layers
      Added value: +{
      +  "description": "导航层位掩码(navigation add,可选)",
      +  "type": "number"
      +}
    • changedInput schema / properties / operations / items / properties / name / description
      Previous value: -"节点名称(node_add)"New value: +"节点名(node_add)/数据层名(cdata add)"
    • addedInput schema / properties / operations / items / properties / navigation_layer
      Added value: +{
      +  "description": "导航 layer 索引,0 起(navigation set)",
      +  "type": "number"
      +}
    • changedInput schema / properties / operations / items / properties / node_path / description
      Previous value: -"TileMap/TileMapLayer 节点路径(tile 操作必需)"New value: +"TileMap/TileMapLayer 节点路径"
    • addedInput schema / properties / operations / items / properties / one_way
      Added value: +{
      +  "description": "单向碰撞(collision set,默认 false)",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / operations / items / properties / op / enum
      Previous value: -[
      -  "tile_set",
      -  "tile_fill",
      -  "tile_erase",
      -  "tile_clear",
      -  "tileset_assign",
      -  "node_property",
      -  "node_add"
      -]New value: +[
      +  "tile_set",
      +  "tile_fill",
      +  "tile_erase",
      +  "tile_clear",
      +  "tileset_assign",
      +  "node_property",
      +  "node_add",
      +  "tileset_physics_layer_add",
      +  "tile_collision_set",
      +  "tileset_physics_layer_set",
      +  "tileset_physics_layer_remove",
      +  "tileset_navigation_layer_add",
      +  "tile_navigation_set",
      +  "tileset_custom_data_layer_add",
      +  "tile_custom_data_set",
      +  "tile_collision_clear"
      +]
    • addedInput schema / properties / operations / items / properties / physics_layer
      Added value: +{
      +  "description": "物理 layer 索引,0 起(collision set/clear)",
      +  "type": "number"
      +}
    • addedInput schema / properties / operations / items / properties / points
      Added value: +{
      +  "description": "polygon 点集 [{x,y}](rect 省略;逐项运行时校验)",
      +  "type": "array"
      +}
    • addedInput schema / properties / operations / items / properties / shape
      Added value: +{
      +  "description": "rect=全格四点;polygon=自定义点集",
      +  "enum": [
      +    "rect",
      +    "polygon"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / operations / items / properties / tileset_path / description
      Previous value: -"TileSet 资源路径(tileset_assign)"New value: +"TileSet .tres 路径(层配置 9 op 限 res:// 项目内)"
    • changedInput schema / properties / operations / items / properties / type / description
      Previous value: -"节点类型(node_add)"New value: +"节点类型(node_add)/int|float|bool|string|color|vector2(cdata add)"
    • changedInput schema / properties / operations / items / properties / value / description
      Previous value: -"属性值"New value: +"属性值(node_property)/数据值(cdata set,须匹配层类型)"
    • changedInput schema / properties / stop_on_error / description
      Previous value: -"commit: 遇错是否停止(默认 true)"New value: +"遇错是否停止(默认 true;false 时失败不阻止后续与 .tres 写盘)"
    • changedInput schema / properties / type / description
      Previous value: -"create_3d_node: 节点类型(仅限白名单)"New value: +"类型(create_3d_node,白名单)"
    • changedInput schema / properties / value / description
      Previous value: -"set_instance_property: 属性值(string/number/bool/null/array)"New value: +"属性值(set_instance_property)"
  2. First observedv0.25.7

TDQS

C2.9/5.0
Behavior2/5

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

The annotations already flag destructiveHint=true, but the description does not go beyond the bare list of action names, so it adds no extra behavioral context. It does not explain which operations persist to disk, what effect commit has, or that some actions remove or detach nodes — the agent is left to infer the destructive nature from action names.

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 very compact and front-loaded with the 'scene operations' heading, then a categorized enumeration of actions. It is scannable and clutter-free, though the use of Chinese punctuation to chain groups makes it a little dense, and omitting some schema actions means the listing is not fully aligned with the enum.

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

Completeness2/5

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

For a dispatcher tool with 30 parameters, a 19-value action enum, nested objects, and no output schema, this description is far from complete. It does not cover all actions in the enum and does not explain the purpose or return/behavior semantics that would let an agent confidently use this tool in high-consequence scene modification scenarios.

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 baseline is 3; the schema already documents per-parameter meanings and per-action notes. The tool description itself does not add semantic value for parameters — it only groups action names, which the schema enum already covers.

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 starts with '场景操作' (scene operations), making it clear this is the scene-operation dispatcher, and then groups the supported actions into categories such as read/create, nodes, save/resources, query, and instances. It is not a mere tautology because it enumerates meaningful sub-operations, though it omits some schema enum actions like open_scene, merge_scene, health_check, create_3d_node, and commit.

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

Usage Guidelines2/5

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

The description provides category labels, which hint at related actions, but it never says when to choose one action over another or when to prefer a sibling tool. Since the tool is an action dispatcher with more than a dozen mutually exclusive enum values, this is a significant guidance gap.

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