get_file_tree
Retrieve the full hierarchy of a Roblox Studio project, including script types, models, and folders, starting from a specified or default path.
Instructions
Get complete hierarchy of the Roblox Studio project with script types, models, and folders
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Optional path to start from (defaults to workspace root) |
Implementation Reference
- src/tools/index.ts:12-22 (handler)Main execution logic for the get_file_tree tool. Makes a request to the Studio client for the file tree and formats the response as MCP content.async getFileTree(path: string = '') { const response = await this.client.request('/api/file-tree', { path }); return { content: [ { type: 'text', text: JSON.stringify(response, null, 2) } ] }; }
- src/index.ts:60-72 (schema)MCP tool schema definition including name, description, and input schema for get_file_tree.name: 'get_file_tree', description: 'Get complete hierarchy of the Roblox Studio project with script types, models, and folders', inputSchema: { type: 'object', properties: { path: { type: 'string', description: 'Optional path to start from (defaults to workspace root)', default: '' } } } },
- src/index.ts:648-649 (registration)Tool dispatch/registration in the MCP CallToolRequestSchema handler switch statement.case 'get_file_tree': return await this.tools.getFileTree((args as any)?.path || '');
- src/http-server.ts:138-145 (registration)HTTP endpoint registration that proxies get_file_tree tool calls.app.post('/mcp/get_file_tree', async (req, res) => { try { const result = await tools.getFileTree(req.body.path); res.json(result); } catch (error) { res.status(500).json({ error: error instanceof Error ? error.message : 'Unknown error' }); } });