Skip to main content
Glama
xinyuzjj

Godot MCP Enhanced

by xinyuzjj

get_uid

Retrieve the unique identifier (UID) for a file in a Godot 4.4+ project by providing the project and file paths.

Instructions

Get the UID for a specific file in a Godot project (for Godot 4.4+)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectPathYesPath to the Godot project directory
filePathYesPath to the file (relative to project) for which to get the UID

Implementation Reference

  • The handleGetUid private method that executes the get_uid tool logic. It normalizes parameters, validates required fields (projectPath and filePath), and calls executeOperation with the 'get_uid' command and file_path argument.
    private async handleGetUid(args: any): Promise<ToolResult> {
      args = this.normalizeParameters(args);
    
      if (!args.projectPath || !args.filePath) {
        return this.createErrorResponse('Project path and file path are required');
      }
    
      try {
        const { stdout, stderr } = await this.executeOperation(
          'get_uid',
          {
            file_path: args.filePath,
          },
          args.projectPath
        );
    
        if (stderr && stderr.includes('ERROR')) {
          return this.createErrorResponse(`Failed to get UID: ${stderr}`);
        }
    
        return this.createSuccessResponse(`UID retrieved successfully`, stdout);
      } catch (error: unknown) {
        const errorMessage = error instanceof Error ? error.message : 'Unknown error';
        return this.createErrorResponse(`Failed to get UID: ${errorMessage}`);
      }
    }
  • The tool definition and input schema for 'get_uid'. It requires 'projectPath' (string) and 'filePath' (string) as inputs.
    // UID Management (Godot 4.4+)
    {
      name: 'get_uid',
      description: 'Get the UID for a specific file in a Godot project (for Godot 4.4+)',
      inputSchema: {
        type: 'object',
        properties: {
          projectPath: {
            type: 'string',
            description: 'Path to the Godot project directory',
          },
          filePath: {
            type: 'string',
            description: 'Path to the file (relative to project) for which to get the UID',
          },
        },
        required: ['projectPath', 'filePath'],
      },
    },
  • src/index.ts:823-825 (registration)
    The case statement in the tool dispatch switch that routes 'get_uid' requests to handleGetUid.
    case 'get_uid':
      result = await this.handleGetUid(request.params.arguments);
      break;
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It only states the basic action and version constraint, without disclosing important behaviors like read-only nature, error handling (e.g., missing file), or required permissions.

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 is front-loaded with the key action and context. No unnecessary words, earning its place.

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?

For a simple getter tool, the description is adequate but incomplete. It does not mention the return format or what happens on failure. With no output schema, the description misses an opportunity to describe the UID or result.

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?

Schema coverage is 100% and parameter descriptions are clear. The description adds the 'Godot 4.4+' version constraint, which is not in the schema. This provides some extra value, but does not significantly enhance understanding of the parameters.

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

Purpose5/5

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

The description clearly states the verb 'Get', the resource 'UID for a specific file', and the context 'Godot project (for Godot 4.4+)'. It distinguishes itself from sibling tools like 'update_project_uids' (update) and 'get_project_info' (general info).

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 implies usage for retrieving a file's UID but provides no explicit guidance on when to use or avoid this tool. No alternatives or preconditions are mentioned, leaving the agent to infer context.

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

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