delete_node
Prune a Godot scene tree by removing a node and its children. Saves automatically; cannot remove scene root.
Instructions
Remove a node and all its children from a Godot scene file. Use when pruning the scene tree; for replacing a node in place, pair with add_node. Saves automatically. Cannot delete the scene root. Errors if nodePath does not exist. Returns { success, nodePath }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectPath | Yes | Path to the Godot project directory | |
| scenePath | Yes | Scene file path relative to the project (e.g. "scenes/main.tscn") | |
| nodePath | Yes | Node path from scene root (e.g. "root/Player/Sprite2D") |