duplicate_node
Duplicate a node and its entire subtree in a Godot scene. Clone a configured subtree without recreating it node-by-node, and get the new path for follow-up edits.
Instructions
Duplicate a node and its descendants in a Godot scene. Use to clone a configured subtree without re-creating it node-by-node via add_node. newName defaults to the original name + "2"; targetParentPath defaults to the original parent. Saves automatically. Returns: success with originalPath and the newPath where the duplicate now lives — use newPath for follow-up edits. Errors if nodePath does not exist or targetParentPath cannot accept children.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectPath | Yes | Path to the Godot project directory | |
| scenePath | Yes | Scene file path relative to the project | |
| nodePath | Yes | Node path from scene root to duplicate | |
| newName | No | Name for the duplicated node (default: original name + "2") | |
| targetParentPath | No | Parent node path for the duplicate (default: same parent as original) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| success | No | ||
| originalPath | No | ||
| newPath | No |