get_godot_version
Retrieves the installed Godot editor version to verify your development environment.
Instructions
Get the installed Godot version
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_godot_version"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:994-1010 (handler)The handler function that executes the 'get_godot_version' tool logic. It checks for a valid Godot path, runs 'godot --version', and returns the version string.
private async handleGetGodotVersion(): Promise<ToolResult> { try { if (!this.godotPath) { await this.detectGodotPath(); } if (!this.godotPath) { return this.createErrorResponse('Could not find a valid Godot executable.'); } const { stdout } = await execFileAsync(this.godotPath, ['--version']); return this.createSuccessResponse(`Godot version: ${stdout.trim()}`); } catch (error: unknown) { const errorMessage = error instanceof Error ? error.message : 'Unknown error'; return this.createErrorResponse(`Failed to get Godot version: ${errorMessage}`); } } - src/index.ts:512-520 (schema)The tool definition and schema registration. The tool takes no arguments (empty inputSchema).
{ name: 'get_godot_version', description: 'Get the installed Godot version', inputSchema: { type: 'object', properties: {}, required: [], }, }, - src/index.ts:796-798 (registration)The switch-case where the tool name 'get_godot_version' is routed to the handler handleGetGodotVersion().
case 'get_godot_version': result = await this.handleGetGodotVersion(); break;