Skip to main content
Glama

add_node

Adds a node to an existing Godot scene, sets property values using Godot literal expressions, and optionally attaches a script.

Instructions

Add a node to an existing scene. Property values are Godot literal expressions, e.g. position: "Vector2(10, 20)", text: '"Hello"'. A script_path attaches a script to the node.

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": {
      "project": "<project>",
      "scene_path": "<scene_path>",
      "name": "<name>",
      "type": "<type>"
    },
    "name": "add_node"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesNode name (identifier)
typeYesGodot class, e.g. "Sprite2D", "CollisionShape2D", "Label"
parentNoParent path from the root; "." (default) adds it under the root
projectYesProject folder name under the projects directory
propertiesNoProperty name to Godot literal value
scene_pathYesScene path relative to the project, e.g. "scenes/level1.tscn"
script_pathNoScript to attach, e.g. "scripts/player.gd"

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It usefully discloses the non-obvious value encoding (Godot literal expressions, including the nested-quote convention for strings) and that script_path attaches a script, but it says nothing about failure modes such as duplicate node names, an invalid parent path, or whether an existing node is overwritten.

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?

Three short sentences, front-loaded with the action and scope, then the highest-risk detail (literal expression format) with a concrete example. The closing sentence on script_path is slightly redundant with the parameter name but still adds the attach behavior.

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?

With seven parameters, a nested object, no annotations, and no output schema, the description covers the trickiest input semantics but leaves gaps: nothing on whether the call returns the created node, on name collisions, or on default parent behavior (left to the schema). Adequate but not fully complete for a mutation tool of this complexity.

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, and the description earns above that by explaining that property values are Godot literal expressions and by demonstrating the exact quoting convention for a string value, which an agent could easily get wrong from the schema alone. It also clarifies that script_path attaches a script rather than merely referencing one.

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 gives a specific verb plus resource ("Add a node") and scopes it to an "existing scene," which distinguishes it from sibling create_scene/create_project operations that create containers rather than children. It does not name a sibling explicitly, so the differentiation is implied rather than stated.

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?

The phrase "existing scene" implies a prerequisite (the scene must already exist) and points an agent toward create_scene when it does not. Beyond that there is no explicit when-to-use or when-not-to-use guidance, and no mention of alternatives for attaching scripts or editing existing node properties.

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