get_scene_tree
Retrieve a nested scene hierarchy tree from a Godot project, scoped by path and depth. Returns node details including name, type, path, script, and children.
Instructions
Get the scene hierarchy as a nested tree of { name, type, path, script, 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. Returns the nested tree as JSON text. Errors if scene does not exist or parentPath is not found.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| maxDepth | No | Maximum recursion depth. -1 for unlimited (default: -1). 1 returns only direct children. | |
| scenePath | Yes | Scene file path relative to the project | |
| parentPath | No | Scope to a subtree starting at this node path (e.g. "root/Player") | |
| projectPath | Yes | Path to the Godot project directory |