get_scene_tree
Retrieves the scene hierarchy as a nested tree, with options to limit depth or scope to a subtree.
Instructions
Get the scene hierarchy as a nested tree of { name, type, path, children }. Use maxDepth:1 for a shallow listing of direct children only; default -1 returns the full tree. parentPath scopes the result to a subtree. Errors if scene does not exist or parentPath is not found.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectPath | Yes | Path to the Godot project directory | |
| scenePath | Yes | Scene file path relative to the project | |
| parentPath | No | Scope to a subtree starting at this node path (e.g. "root/Player") | |
| maxDepth | No | Maximum recursion depth. -1 for unlimited (default: -1). 1 returns only direct children. |