duplicate_node
Copy a node and all descendants in a Godot scene to a target parent, optionally renaming it, and save automatically.
Instructions
Duplicate a node and its descendants in a Godot scene, without rebuilding 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. Errors if nodePath does not exist or targetParentPath cannot accept children. Errors while a Godot runtime session is active on this project; stop_project (or detach_project) clears it.
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 | |
| 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 |
|---|---|---|---|
| newPath | No | ||
| success | No | ||
| originalPath | No |