Skip to main content
Glama

xcode_health_check

Analyze and verify the health of the XcodeMCP environment and configurations to ensure optimal performance for build automation and log parsing.

Instructions

Perform a comprehensive health check of the XcodeMCP environment and configuration

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "properties": {}, "type": "object" }

Implementation Reference

  • Handler dispatch for xcode_health_check tool in MCP CallToolRequestSchema - calls EnvironmentValidator.createHealthCheckReport() and returns the result
    // Handle health check tool first (no environment validation needed) if (name === 'xcode_health_check') { const report = await EnvironmentValidator.createHealthCheckReport(); return { content: [{ type: 'text', text: report }] }; }
  • Core implementation: EnvironmentValidator.createHealthCheckReport() generates the comprehensive health check report based on environment validation
    public static async createHealthCheckReport(): Promise<string> { const results = await this.validateEnvironment(); const version = this.getVersion(); const report = [ `XcodeMCP Configuration Health Check (v${version})`, '='.repeat(50), '', this.generateValidationSummary(results), '' ]; if (!results.overall.valid) { report.push('IMMEDIATE ACTIONS REQUIRED:'); results.overall.criticalFailures.forEach(component => { const result = results[component]; if (result && 'valid' in result) { const validationResult = result as EnvironmentValidationResult; report.push(`\n${component.toUpperCase()} FAILURE:`); validationResult.recoveryInstructions?.forEach((instruction: string) => { report.push(`• ${instruction}`); }); } }); if (results.overall.nonCriticalFailures.length > 0) { report.push('\nOPTIONAL IMPROVEMENTS:'); results.overall.nonCriticalFailures.forEach(component => { const result = results[component]; if (result && 'valid' in result) { const validationResult = result as EnvironmentValidationResult; report.push(`\n${component.toUpperCase()}:`); validationResult.recoveryInstructions?.forEach((instruction: string) => { report.push(`• ${instruction}`); }); } }); } } const unavailableFeatures = this.getUnavailableFeatures(results); if (unavailableFeatures.length > 0) { report.push('\nLIMITED FUNCTIONALITY:'); unavailableFeatures.forEach(feature => { report.push(`• ${feature}`); }); } return report.join('\n'); }
  • Tool schema definition: no input parameters required
    name: 'xcode_health_check', description: 'Perform a comprehensive health check of the XcodeMCP environment and configuration', inputSchema: { type: 'object', properties: {}, }, },
  • Tool registration: ListToolsRequestSchema handler calls getToolDefinitions() which includes xcode_health_check and returns it to MCP clients
    this.server.setRequestHandler(ListToolsRequestSchema, async () => { const toolOptions: { includeClean: boolean; preferredScheme?: string; preferredXcodeproj?: string; } = { includeClean: this.includeClean }; if (this.preferredScheme) toolOptions.preferredScheme = this.preferredScheme; if (this.preferredXcodeproj) toolOptions.preferredXcodeproj = this.preferredXcodeproj; const toolDefinitions = getToolDefinitions(toolOptions); return { tools: toolDefinitions.map(tool => ({ name: tool.name, description: tool.description, inputSchema: tool.inputSchema })), }; });
  • Special handling: xcode_health_check is always allowed even if environment validation fails (called before validation)
    public async validateToolOperation(toolName: string): Promise<McpResult | null> { // Health check tool should never be blocked if (toolName === 'xcode_health_check') { return null; }

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/lapfelix/XcodeMCP'

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