delete_nodes
Remove one or more nodes and their descendants from a Godot scene file, saving once at the end and returning a success or error result for each node.
Instructions
Remove one or more nodes, with their descendants, from a scene. Always-array: pass a single-element nodePaths array for a one-off delete. Saves once at the end. The scene root, a node inside an instanced scene, and a node inherited from a base scene cannot be deleted: that entry reports an error and the rest still process. Returns: results[], one entry per nodePath in input order, each with success or error. Errors while a runtime session is live on this project.
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>",
"nodePaths": "<nodePaths>"
},
"name": "delete_nodes"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodePaths | Yes | Node paths from scene root to delete (e.g. ["root/Player/Sprite2D"]) | |
| scenePath | Yes | Scene file path relative to the project (e.g. "scenes/main.tscn") | |
| projectPath | Yes | Path to the Godot project directory |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| results | Yes | ||
| warnings | No |