Skip to main content
Glama

scan_workspace_diagnostics

Scan all GDScript files in your Godot workspace to identify errors, warnings, and issues across the entire codebase. Use this tool to find problems when you need comprehensive diagnostics for multiple files.

Instructions

⚠️ EXPENSIVE: Scans ALL GDScript (.gd) files in workspace for errors, warnings, and issues (may take 5-30s for 100+ files). Use sparingly - only when you need to find problems across the entire codebase. For checking individual files, use get_diagnostics instead. Opens each .gd file (excluding addons/ and .godot/) to retrieve diagnostics from Godot Language Server.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function `scanWorkspaceDiagnostics` that performs the actual workspace diagnostics scan using the DiagnosticsManager.
    export async function scanWorkspaceDiagnostics( diagnosticsManager: DiagnosticsManager, isConnected: boolean ): Promise<ScanWorkspaceOutput> { // Check if LSP is connected if (!isConnected) { return { files_scanned: 0, files_with_issues: 0, scan_time_seconds: 0, diagnostics: {}, error: `Godot LSP is not running. Please start Godot with your project: CLI: godot --editor --path /path/to/project GUI: Open the project in Godot Editor The Language Server Protocol must be enabled (default: ON) in: Project → Project Settings → Network → Language Server Once Godot is running, diagnostics will be available automatically.`, }; } const startTime = Date.now(); const diagnostics = await diagnosticsManager.scanWorkspace(); const scanTime = ((Date.now() - startTime) / 1000).toFixed(2); const filesScanned = Object.keys(diagnostics).length; const filesWithIssues = Object.values(diagnostics).filter((d) => d.length > 0).length; return { files_scanned: filesScanned, files_with_issues: filesWithIssues, scan_time_seconds: parseFloat(scanTime), diagnostics, }; }
  • MCP tool definition including name, description, and input schema (no parameters required).
    export const scanWorkspaceDiagnosticsTool = { name: 'scan_workspace_diagnostics', description: '⚠️ EXPENSIVE: Scans ALL GDScript (.gd) files in workspace for errors, warnings, and issues (may take 5-30s for 100+ files). Use sparingly - only when you need to find problems across the entire codebase. For checking individual files, use get_diagnostics instead. Opens each .gd file (excluding addons/ and .godot/) to retrieve diagnostics from Godot Language Server.', inputSchema: { type: 'object', properties: {}, required: [], }, };
  • TypeScript interface defining the structured output of the scanWorkspaceDiagnostics function.
    export interface ScanWorkspaceOutput { files_scanned: number; files_with_issues: number; scan_time_seconds: number; diagnostics: Record<string, Diagnostic[]>; error?: string; }
  • src/index.ts:63-65 (registration)
    Registration of the tool in the MCP server's listTools handler response.
    tools: [getDiagnosticsTool, scanWorkspaceDiagnosticsTool], }));
  • src/index.ts:84-95 (registration)
    Dispatch handler in the MCP callToolRequest that invokes the scanWorkspaceDiagnostics function and formats the response.
    if (name === 'scan_workspace_diagnostics') { const result = await scanWorkspaceDiagnostics(diagnosticsManager, isConnected); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
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/ryanmazzolini/minimal-godot-mcp'

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