Skip to main content
Glama

get_project_structure

Retrieve the complete hierarchy of a Roblox game project, starting from the workspace root or a specified path. Use the maxDepth parameter to control traversal depth, with higher values (5-10) for detailed exploration. Optional filters include scriptsOnly for isolating script containers.

Instructions

Get complete game hierarchy. IMPORTANT: Use maxDepth parameter (default: 3) to explore deeper levels of the hierarchy. Set higher values like 5-10 for comprehensive exploration

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxDepthNoMaximum depth to traverse (default: 3). RECOMMENDED: Use 5-10 for thorough exploration. Higher values provide more complete structure
pathNoOptional path to start from (defaults to workspace root)
scriptsOnlyNoShow only scripts and script containers

Implementation Reference

  • The main execution logic for the 'get_project_structure' tool. Makes an HTTP request to the Roblox Studio bridge endpoint '/api/project-structure' with optional parameters path, maxDepth, and scriptsOnly, then formats and returns the response as MCP content.
    async getProjectStructure(path?: string, maxDepth?: number, scriptsOnly?: boolean) { const response = await this.client.request('/api/project-structure', { path, maxDepth, scriptsOnly }); return { content: [ { type: 'text', text: JSON.stringify(response, null, 2) } ] }; }
  • The input schema and metadata definition for the MCP tool, listed in the ListToolsRequestSchema response. Defines parameters, descriptions, and defaults.
    name: 'get_project_structure', description: 'Get complete game hierarchy. IMPORTANT: Use maxDepth parameter (default: 3) to explore deeper levels of the hierarchy. Set higher values like 5-10 for comprehensive exploration', inputSchema: { type: 'object', properties: { path: { type: 'string', description: 'Optional path to start from (defaults to workspace root)', default: '' }, maxDepth: { type: 'number', description: 'Maximum depth to traverse (default: 3). RECOMMENDED: Use 5-10 for thorough exploration. Higher values provide more complete structure', default: 3 }, scriptsOnly: { type: 'boolean', description: 'Show only scripts and script containers', default: false } } } },
  • src/index.ts:672-673 (registration)
    Tool call dispatching in the CallToolRequestSchema handler. Routes incoming tool calls to the RobloxStudioTools.getProjectStructure method.
    case 'get_project_structure': return await this.tools.getProjectStructure((args as any)?.path, (args as any)?.maxDepth, (args as any)?.scriptsOnly);
  • HTTP proxy endpoint registration for direct HTTP calls to the tool from the Roblox Studio plugin bridge.
    app.post('/mcp/get_project_structure', async (req, res) => { try { const result = await tools.getProjectStructure(req.body.path, req.body.maxDepth, req.body.scriptsOnly); res.json(result); } catch (error) { res.status(500).json({ error: error instanceof Error ? error.message : 'Unknown error' }); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/boshyxd/robloxstudio-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server