Skip to main content
Glama
boshyxd

Roblox Studio MCP Server

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' });
      }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It adds some context by highlighting the maxDepth parameter's impact on exploration depth and recommending values, but it doesn't cover other behavioral aspects like performance implications, rate limits, authentication needs, or what 'complete game hierarchy' entails in terms of data structure or format.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded: the first sentence states the core purpose, and the second provides critical usage guidance for the key parameter. Every sentence earns its place without redundancy, making it efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (3 parameters, no output schema, and no annotations), the description is somewhat complete but has gaps. It covers the purpose and key parameter usage but lacks details on return values, error handling, or how it differs from sibling tools. Without an output schema, the description should ideally hint at what 'complete game hierarchy' returns, but it doesn't.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, so the baseline is 3. The description adds value by emphasizing the importance of maxDepth and providing usage recommendations (e.g., 'Set higher values like 5-10 for comprehensive exploration'), which goes beyond the schema's default and description. However, it doesn't elaborate on the other parameters (path, scriptsOnly) beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get complete game hierarchy' specifies both the verb ('Get') and resource ('complete game hierarchy'). However, it doesn't explicitly differentiate from sibling tools like 'get_file_tree' or 'get_instance_children', which likely retrieve similar hierarchical data but with different scopes or formats.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides some usage guidance by emphasizing the importance of the maxDepth parameter and recommending values (5-10) for comprehensive exploration. However, it lacks explicit when-to-use vs. alternatives, such as comparing it to 'get_file_tree' or 'get_instance_children', and doesn't mention prerequisites or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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