Skip to main content
Glama

duplicate_node

Duplicate a node and all its descendants in a Godot scene, preserving saved signal connections. Use it instead of rebuilding nodes manually; the scene saves automatically.

Instructions

Duplicate a node and its descendants, instead of rebuilding it with add_node. newName defaults to the original name plus "2"; targetParentPath to the parent of the original. Keeps the saved signal connections like the editor; copySignals false drops them. Saves automatically. Returns: nodePath (copied node), newNodePath (read back). Errors if nodePath or targetParentPath is not found, nodePath is the root, or a runtime session is live.

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": {
      "projectPath": "<projectPath>",
      "scenePath": "<scenePath>",
      "nodePath": "<nodePath>"
    },
    "name": "duplicate_node"
  }
}

Input Schema

NameRequiredDescriptionDefault
newNameNoName for the duplicated node (default: original name + "2")
nodePathYesNode path from scene root to duplicate
scenePathYesScene file path relative to the project
copySignalsNoKeep the copy's saved signal connections (default true). False drops those from the copy or a node inside it to a node outside the copied subtree; connections within the subtree stay.
projectPathYesPath to the Godot project directory
targetParentPathNoParent node path for the duplicate (default: same parent as original)

Output Schema

NameRequiredDescriptionDefault
nodePathYes
warningsNo
newNodePathYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv4.0.1
    • addedInput schema / properties / copySignals
      Added value: +{
      +  "description": "Keep the copy's saved signal connections (default true). False drops those from the copy or a node inside it to a node outside the copied subtree; connections within the subtree stay.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / newNodePath
      Added value: +{
      +  "type": "string"
      +}
    • removedOutput schema / properties / newPath
      Removed value: -{
      -  "type": "string"
      -}
    • addedOutput schema / properties / nodePath
      Added value: +{
      +  "type": "string"
      +}
    • removedOutput schema / properties / originalPath
      Removed value: -{
      -  "type": "string"
      -}
    • removedOutput schema / properties / success
      Removed value: -{
      -  "type": "boolean"
      -}
    • addedOutput schema / properties / warnings
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / required
      Added value: +[
      +  "nodePath",
      +  "newNodePath"
      +]
  2. Addedv3.1.1
  3. Removedv3.0.0
  4. Addedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and largely meets it: it discloses the auto-save side effect, the signal-connection retention behavior and what copySignals=false actually drops, plus concrete failure conditions (bad nodePath/targetParentPath, root node, live runtime session). It does not say what happens if a node with the defaulted "name2" already exists at the target parent, which is the main undisclosed edge case for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Terse, front-loaded, and every clause carries information: purpose, defaults, behavior, persistence, return values, and error cases in a handful of sentences. No filler or restated title.

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 6-parameter mutation tool with an output schema and no annotations, the definition covers side effects, defaults, and failure modes well enough to call it correctly. The missing piece is collision/overwrite behavior when the target name already exists.

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 every parameter including the copySignals subtree-scoping detail is already documented in the schema. The description restates the same defaults without adding format or syntax meaning beyond that, so the baseline applies.

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?

Specific verb plus resource ("Duplicate a node and its descendants") with an explicit contrast to the sibling alternative add_node. An agent can distinguish this from add_node without opening either schema.

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

Usage Guidelines4/5

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

Explicitly routes the agent away from the rebuild approach: "instead of rebuilding it with add_node," and states defaults for newName and targetParentPath so the call is predictable. It does not spell out when-not to use it beyond the enumerated error conditions, which keeps it short of a full 5.

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