Skip to main content
Glama

add_node

Add a node to a Godot scene with automatic saving. Validates property types and errors on invalid values, returning a plain-text confirmation.

Instructions

Add a node to a Godot scene. Saves automatically. position, rotation, scale, visible, modulate are top-level params; anything else goes in properties. Values are checked against the property's declared type and error instead of silently storing that type's zero value. Object-typed properties take a res:// path, a {type: ClassName, ...props} dict that builds a Resource inline, or null; slash-suffixed keys like shader_parameter/ go inside that dict, not on the node. Value coercion, Packed*Array/Array[T] element rules and error details: Property Values in docs/tools.md. Returns plain-text confirmation of the new node and type. Errors and adds nothing if nodeType is not a registered class, the parent is missing, or a property name or value is invalid. Errors while a Godot runtime session is active; stop_project or detach_project clears it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scaleNoVector2 scale (e.g. {"x": 2, "y": 2})
visibleNoWhether the node is visible
modulateNoColor modulation (e.g. {"r": 1, "g": 0, "b": 0, "a": 1})
nodeNameYesName for the new node as it appears in the scene tree
nodeTypeYesGodot node class to instantiate (e.g. "Sprite2D", "CollisionShape2D", "Label"), or a project-relative scene path (.tscn or .scn, e.g. "scenes/enemy.tscn") to instance an existing scene as a child - instanced children serialize as `instance=ExtResource(...)` on save
positionNoPosition: {"x": 100, "y": 200} on a 2D node, {"x": 0, "y": 1, "z": 0} on a 3D node
rotationNoRotation in radians
scenePathYesScene file path relative to the project
propertiesNoAdditional property values as a JSON object. Top-level params (position, rotation, etc.) take precedence over keys in this dict.
projectPathYesPath to the Godot project directory
parentNodePathNoParent node path from scene root (e.g. "root/Player"). Defaults to the root node.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv3.6.0
    • changedInput schema / properties / nodeType / description
      Previous value: -"Godot node class to instantiate (e.g. \"Sprite2D\", \"CollisionShape2D\", \"Label\"), or a project-relative scene path (.tscn or .scn, e.g. \"scenes/enemy.tscn\") to instance an existing scene as a child — instanced children serialize as `instance=ExtResource(...)` on save"New value: +"Godot node class to instantiate (e.g. \"Sprite2D\", \"CollisionShape2D\", \"Label\"), or a project-relative scene path (.tscn or .scn, e.g. \"scenes/enemy.tscn\") to instance an existing scene as a child - instanced children serialize as `instance=ExtResource(...)` on save"
  2. Changed4 schema fields changedv3.3.0
    • changedInput schema / properties / nodeType / description
      Previous value: -"Godot node class to instantiate (e.g. \"Sprite2D\", \"CollisionShape2D\", \"Label\")"New value: +"Godot node class to instantiate (e.g. \"Sprite2D\", \"CollisionShape2D\", \"Label\"), or a project-relative scene path (.tscn or .scn, e.g. \"scenes/enemy.tscn\") to instance an existing scene as a child — instanced children serialize as `instance=ExtResource(...)` on save"
    • changedInput schema / properties / position / description
      Previous value: -"Vector2 position (e.g. {\"x\": 100, \"y\": 200})"New value: +"Position: {\"x\": 100, \"y\": 200} on a 2D node, {\"x\": 0, \"y\": 1, \"z\": 0} on a 3D node"
    • addedInput schema / properties / position / properties / z
      Added value: +{
      +  "type": "number"
      +}
    • removedInput schema / properties / position3d
      Removed value: -{
      -  "description": "Vector3 position for 3D nodes (e.g. {\"x\": 0, \"y\": 1, \"z\": 0})",
      -  "properties": {
      -    "x": {
      -      "type": "number"
      -    },
      -    "y": {
      -      "type": "number"
      -    },
      -    "z": {
      -      "type": "number"
      -    }
      -  },
      -  "type": "object"
      -}
  3. Addedv3.1.1
  4. Removedv3.0.0
  5. Addedv1.0.0

TDQS

A4.5/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 does so thoroughly: it discloses automatic saving, type-checking with error instead of silent zero values, object-typed property input formats, runtime-session conflict behavior, and a specific docs reference. It also lists precise failure conditions. This is exemplary transparency.

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 dense but every sentence carries information, and the primary purpose is front-loaded. It is a single long paragraph rather than structured bullets, but the flow is logical and no sentence is filler. Slight length is justified by the tool's complexity.

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?

The description covers return format (plain-text confirmation), failure conditions, runtime-session constraint, and parameter semantics. It even points to a docs file for advanced coercion rules. For a tool with no output schema and no annotations, this is complete enough for an agent to call it correctly in most cases.

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

Parameters5/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, but the description adds critical semantics beyond the schema: it distinguishes top-level params from the properties dict, explains type-checking behavior, and spells out the allowed formats for object-typed properties (res:// path, inline dict, or null) plus the slash-suffixed key convention. This materially improves the agent's ability to construct valid 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?

The description opens with a specific verb and resource ('Add a node to a Godot scene'), immediately distinguishing it from siblings like set_node_properties or delete_nodes. The scope is unambiguous, and additional detail about saving and parameter handling reinforces the purpose.

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

Usage Guidelines3/5

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

There is no explicit when-to-use guidance or named alternatives. Usage is implied by the tool name and first sentence, but no exclusions compare it to related tools like create_scene or duplicate_node. Error conditions are presented as failure modes, not as selection criteria.

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