Overview
Theget_file_tree tool retrieves the instance hierarchy tree from Roblox Studio. It returns game instances (Parts, Scripts, Models, Folders, etc.) organized as a tree structure.
Parameters
Roblox instance path to start from using dot notation (e.g.,
"game.Workspace", "game.ServerScriptService").Defaults to game root if empty or not provided.Examples
"game.Workspace"- Get Workspace hierarchy"game.ServerScriptService"- Get all server scripts"game.Workspace.Obby"- Get specific folder hierarchy""- Get entire game hierarchy from root
Return Value
Returns a JSON tree structure representing the instance hierarchy.Tree Node Structure
Each node in the tree contains:- name (string) - The instance’s Name property
- className (string) - The instance’s ClassName (e.g., “Part”, “Script”, “Folder”)
- path (string) - Full dot-notation path to the instance
- children (array) - Array of child nodes with the same structure
Usage Examples
Get Workspace Hierarchy
Get All Server Scripts
Get Entire Game Hierarchy
Get Specific Folder
Common Use Cases
1. Exploring Game Structure
Useget_file_tree to understand the organization of a Roblox place:
2. Finding All Scripts
Get the script hierarchy to see all LocalScripts, Scripts, and ModuleScripts:3. Analyzing Folder Structure
Explore how a specific system or feature is organized:Related Tools
- search_files - Search for instances by name, type, or content
- get_project_structure - Get hierarchy with depth control and filtering
- get_instance_children - Get direct children of an instance without full tree
- get_descendants - Get all descendants with class/name filters
Notes
- The tree includes all descendants, not just immediate children
- Very deep hierarchies may return large responses
- For large game structures, consider using
get_project_structurewithmaxDepthparameter - Empty folders will have an empty
childrenarray - The
pathfield can be used directly with other tools