Skip to main content
Glama

Change a scene

godot_scene_edit
Destructive

Edit a .tscn scene file without opening the Godot editor, changing only the lines of that edit. Add, remove, set, connect, or attach scripts, preview the diff first, then write safely.

Instructions

Change a .tscn safely without the editor, touching only the lines of that change. op and its fields: add_node (parent, name, and type or instance), remove_node (node; with its children, connections and the resources only it used), set (node, property, value; checked against Godot 4.7, enums by name, resources as res:// files), connect and disconnect (from, signal, to, method; checks the signal exists, warns when the method is missing or takes the wrong number of arguments, with the func line to add), attach_script (node, script; refuses a script that extends another node type), set_editable (node, editable). A change inside an instance that is not editable is refused, because Godot drops it on the next editor save; make_editable adds [editable] with it. Node paths are relative to the scene root ".". Without write it returns the diff and warnings; with write: true it writes and reports the review errors before and after (an error result when there are more after). A missing field or a refused change is an error and writes nothing. For project.godot use godot_project_edit; to rename a node everywhere, godot_rename.

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": {
      "scene": "<scene>",
      "op": "<op>"
    },
    "name": "godot_scene_edit"
  }
}

Input Schema

NameRequiredDescriptionDefault
opYeswhat to change
toNoconnect/disconnect: path of the node that receives
fromNoconnect/disconnect: path of the node that emits
nameNoadd_node: name of the new node
nodeNoremove_node/set/attach_script/set_editable: path of the node ("." is the root)
typeNoadd_node: a Godot node class, e.g. Sprite2D
sceneYesthe scene: res://main.tscn, or a path
valueNoset: the value, e.g. Vector2(10, 20), 3, true, ALWAYS, res://icon.svg, null
writeNowrite the change (default false: show the diff only)
methodNoconnect/disconnect: method name
parentNoadd_node: path of the parent ("." is the root)
scriptNoattach_script: res:// path of the script
signalNoconnect/disconnect: signal name
editableNoset_editable: false to make it not editable (default true)
instanceNoadd_node: a res:// scene to instance instead of a type
propertyNoset: property name, e.g. position
make_editableNoadd_node/set/connect: also make the instance editable when the change is inside one

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.6.0
    • addedInput schema / properties / editable
      Added value: +{
      +  "description": "set_editable: false to make it not editable (default true)",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / make_editable
      Added value: +{
      +  "description": "add_node/set/connect: also make the instance editable when the change is inside one",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / node / description
      Previous value: -"remove_node/set/attach_script: path of the node (\".\" is the root)"New value: +"remove_node/set/attach_script/set_editable: path of the node (\".\" is the root)"
    • changedInput schema / properties / op / enum
      Previous value: -[
      -  "add_node",
      -  "remove_node",
      -  "set",
      -  "connect",
      -  "disconnect",
      -  "attach_script"
      -]New value: +[
      +  "add_node",
      +  "remove_node",
      +  "set",
      +  "connect",
      +  "disconnect",
      +  "attach_script",
      +  "set_editable"
      +]
  2. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Goes well beyond the annotations: remove_node cascades to children, connections and orphaned resources; set values are validated against Godot 4.7 with enums by name; connect warns on missing methods and wrong arity; attach_script refuses scripts extending a different node type. It also explains the dry-run default and the before/after review-error behavior, which is exactly the mutation context annotations cannot convey.

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?

Front-loaded with purpose, then the safety contract, then the per-op field list, then the return behavior and sibling routing. It is a dense paragraph rather than a structured list, but nearly every clause carries information an agent needs.

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 17-parameter, non-idempotent, destructive mutation with no output schema, it covers validation rules, refusal cases, and what is returned with and without write. The only real gap is that per-op parameter applicability is spread across one run-on sentence rather than enumerated, which risks being scanned incompletely.

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% and the schema already maps each field to its op, so the baseline is 3. The description still adds real meaning by grouping fields per op, specifying accepted value syntax, and clarifying that node paths are relative to the root '.', which resolves ambiguity in path-taking 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?

States a specific verb and resource ("Change a .tscn safely without the editor") and immediately narrows the scope to only the lines of that change. It explicitly distinguishes itself from godot_project_edit and godot_rename, so an agent can route correctly without reading other definitions.

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?

Gives the alternative tools by name with the condition that selects them (project.godot -> godot_project_edit, renaming a node everywhere -> godot_rename). It also states the precondition that changes inside a non-editable instance are refused and that make_editable is the remedy.

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