Skip to main content
Glama

add_node

Insert a Godot node into a scene and save it automatically, validating property types and paths before adding. Returns the new node name and type or errors without changing the scene.

Instructions

Add a node to a Godot scene. Saves automatically. Common spatial properties (position, rotation, scale, visible, modulate) are top-level params; anything else goes under properties. {x,y} / {x,y,z} / {r,g,b,a} auto-convert to Vector2 / Vector3 / Color. 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 typed dict {type: ClassName, ...props} that constructs a Resource inline, or null. Full value rules: the Property Values section of docs/tools.md. parentNodePath defaults to the scene root. Returns a plain-text confirmation naming the new node and type. Errors, and adds nothing, if nodeType is not a registered Godot class, parentNodePath does not exist, or a property name or value is invalid. Errors while a Godot runtime session is active on this project; 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

A3.8/5.0
Behavior4/5

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

No annotations, so the description carries the full burden. It discloses auto-save, type checking (errors instead of silently storing zero value), automatic conversion of dicts to Vector2/Vector3/Color, object-typed property handling, and error conditions. However, it does not mention whether the operation can be undone or how concurrency is handled.

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?

Information is front-loaded and mostly efficient, but the description is fairly dense and includes some repetition (e.g., both schema and description explain dict conversion). Sentences are purposeful with no obvious waste, but could be slightly tighter.

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

Completeness3/5

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

For a mutation tool with no annotations and no output schema, the description is reasonably complete: it covers auto-save, type checking, conversion rules, error conditions, and session interference. However, it lacks details on return format beyond 'plain-text confirmation' and does not mention permissions or side effects like undo capabilities.

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 coverage is 100%, so the schema already documents all parameters. The description reiterates top-level params, dict conversion rules, and the default behavior of parentNodePath, adding some clarity but largely duplicating schema info. Baseline 3 is appropriate when schema is fully covered.

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+resource (add a node to a Godot scene) and clearly describes the operation. Siblings like create_scene, add_autoload, duplicate_node, attach_script are distinguishable because the resource and action are explicit.

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?

Provides implicit context through prerequisites (errors if a Godot runtime session is active) and fallback behavior (parentNodePath defaults to root), but does not explicitly say when to use this tool versus alternatives like duplicate_node, batch_scene_operations, or create_scene.

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