Skip to main content
Glama

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
NameRequiredDescriptionDefault
service_groupNoService group: 'all', 'mcp_servers', 'workers', 'infrastructure'
service_namesNoOptional specific service names to check

Implementation Reference

  • 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;
  • 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" } } } },
  • 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() || "" }; } }

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/itsablabla/lastrock-mcp'

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