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
| Name | Required | Description | Default |
|---|---|---|---|
| newName | No | Name for the duplicated node (default: original name + "2") | |
| nodePath | Yes | Node path from scene root to duplicate | |
| scenePath | Yes | Scene file path relative to the project | |
| copySignals | No | 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. | |
| projectPath | Yes | Path to the Godot project directory | |
| targetParentPath | No | Parent node path for the duplicate (default: same parent as original) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodePath | Yes | ||
| warnings | No | ||
| newNodePath | Yes |