Skip to main content
Glama

launch_editor

Launch the Godot editor to open and work on a specific game project directory.

Instructions

Launch Godot editor for a specific project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectPathYesPath to the Godot project directory

Implementation Reference

  • The handler function that executes the launch_editor tool. It validates the project path, detects Godot if needed, checks for project.godot file, and spawns the Godot process with '-e --path <projectPath>' to launch the editor.
    private async handleLaunchEditor(args: any) {
      // Normalize parameters to camelCase
      args = this.normalizeParameters(args);
      
      if (!args.projectPath) {
        return this.createErrorResponse(
          'Project path is required',
          ['Provide a valid path to a Godot project directory']
        );
      }
    
      if (!this.validatePath(args.projectPath)) {
        return this.createErrorResponse(
          'Invalid project path',
          ['Provide a valid path without ".." or other potentially unsafe characters']
        );
      }
    
      try {
        // Ensure godotPath is set
        if (!this.godotPath) {
          await this.detectGodotPath();
          if (!this.godotPath) {
            return this.createErrorResponse(
              'Could not find a valid Godot executable path',
              [
                'Ensure Godot is installed correctly',
                'Set GODOT_PATH environment variable to specify the correct path',
              ]
            );
          }
        }
    
        // Check if the project directory exists and contains a project.godot file
        const projectFile = join(args.projectPath, 'project.godot');
        if (!existsSync(projectFile)) {
          return this.createErrorResponse(
            `Not a valid Godot project: ${args.projectPath}`,
            [
              'Ensure the path points to a directory containing a project.godot file',
              'Use list_projects to find valid Godot projects',
            ]
          );
        }
    
        this.logDebug(`Launching Godot editor for project: ${args.projectPath}`);
        const process = spawn(this.godotPath, ['-e', '--path', args.projectPath], {
          stdio: 'pipe',
        });
    
        process.on('error', (err: Error) => {
          console.error('Failed to start Godot editor:', err);
        });
    
        return {
          content: [
            {
              type: 'text',
              text: `Godot editor launched successfully for project at ${args.projectPath}.`,
            },
          ],
        };
      } catch (error: unknown) {
        const errorMessage = error instanceof Error ? error.message : 'Unknown error';
        return this.createErrorResponse(
          `Failed to launch Godot editor: ${errorMessage}`,
          [
            'Ensure Godot is installed correctly',
            'Check if the GODOT_PATH environment variable is set correctly',
            'Verify the project path is accessible',
          ]
        );
      }
    }
  • The input schema definition for the launch_editor tool, specifying that projectPath is required.
    inputSchema: {
      type: 'object',
      properties: {
        projectPath: {
          type: 'string',
          description: 'Path to the Godot project directory',
        },
      },
      required: ['projectPath'],
    },
  • src/index.ts:934-935 (registration)
    Registers the handleLaunchEditor function to handle calls to the 'launch_editor' tool in the CallToolRequestSchema switch statement.
    case 'launch_editor':
      return await this.handleLaunchEditor(request.params.arguments);
  • src/index.ts:669-682 (registration)
    Registers the launch_editor tool in the ListToolsRequestSchema response, including name, description, and schema.
    {
      name: 'launch_editor',
      description: 'Launch Godot editor for a specific project',
      inputSchema: {
        type: 'object',
        properties: {
          projectPath: {
            type: 'string',
            description: 'Path to the Godot project directory',
          },
        },
        required: ['projectPath'],
      },
    },
Behavior2/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 states the action ('Launch') but doesn't explain what this entails—e.g., whether it opens a GUI, requires specific permissions, has side effects like locking files, or how it handles errors. This leaves significant gaps in understanding the tool's behavior beyond the basic action.

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 a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's front-loaded and wastes no space, making it easy to parse quickly while conveying the essential action.

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

Completeness2/5

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

Given the complexity of launching an editor (which could involve system interactions, error handling, and side effects), the description is insufficient. With no annotations, no output schema, and minimal behavioral details, it fails to provide enough context for safe and effective use, especially compared to sibling tools that might overlap in functionality.

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

Parameters3/5

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

The input schema has 100% description coverage, with the parameter 'projectPath' clearly documented as 'Path to the Godot project directory'. The description doesn't add any additional semantic context beyond this, such as format examples or constraints, so it meets the baseline for high schema coverage without compensating further.

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 action ('Launch') and target resource ('Godot editor for a specific project'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'run_project' or 'stop_project', which also involve project execution/management, so it doesn't reach the highest score for sibling distinction.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'run_project' (which might execute a project without launching the editor) or 'list_projects' (which could help identify available projects). There's no mention of prerequisites, such as needing Godot installed or the project being valid, leaving usage context unclear.

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

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/Coding-Solo/godot-mcp'

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