check_services_health
Monitor service health status for MCP servers, workers, or infrastructure components to identify operational issues and ensure system reliability.
Instructions
Check health of one or more services. Safe read-only operation.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| service_group | No | Service group: 'all', 'mcp_servers', 'workers', 'infrastructure' | |
| service_names | No | Optional specific service names to check |
Implementation Reference
- src/index.ts:244-261 (handler)Handler logic for the 'check_services_health' tool: extracts input parameters (service_group, service_names), formats them, and calls executeOrchestrator with operation 'maintain/health-check'.case "check_services_health": { const { service_group, service_names } = args as { service_group?: string; service_names?: string[]; }; const params: Record<string, string> = {}; if (service_group) { params.service_group = service_group; } if (service_names) { params.service_names = service_names.join(","); } result = executeOrchestrator("maintain/health-check", params); break;
- src/index.ts:113-130 (schema)Tool definition including name, description, and input schema for 'check_services_health', used for registration and validation.{ name: "check_services_health", description: "Check health of one or more services. Safe read-only operation.", inputSchema: { type: "object", properties: { service_group: { type: "string", description: "Service group: 'all', 'mcp_servers', 'workers', 'infrastructure'" }, service_names: { type: "array", items: { type: "string" }, description: "Optional specific service names to check" } } } },
- src/index.ts:16-43 (helper)Helper function executeOrchestrator that runs the external Python orchestrator script with the specified operation ('maintain/health-check' for this tool) and parameters, parses output as JSON or text, and handles errors.function executeOrchestrator(operation: string, params: Record<string, string> = {}): any { const paramStr = Object.entries(params) .map(([key, value]) => `${key}="${value}"`) .join(" "); const cmd = `cd ${ORCHESTRATOR_PATH} && python orchestrator.py ${operation} ${paramStr}`; try { const output = execSync(cmd, { encoding: "utf-8", maxBuffer: 10 * 1024 * 1024 }); // Try to parse as JSON, fallback to plain text try { return JSON.parse(output); } catch { return { output: output.trim() }; } } catch (error: any) { return { success: false, error: error.message, stderr: error.stderr?.toString() || "", stdout: error.stdout?.toString() || "" }; } }