zetrix_check_health
Monitor the operational status and connectivity of the Zetrix blockchain node to ensure reliable network access and functionality.
Instructions
Check the health status of the Zetrix node
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/zetrix-client.ts:163-183 (handler)Core handler function that checks Zetrix node health by calling /hello endpoint and returns health status.async checkHealth(): Promise<ZetrixNodeHealth> { try { const response = await this.client.get("/hello"); return { healthy: response.status === 200, network: this.network, rpcUrl: this.rpcUrl, timestamp: Date.now(), }; } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); return { healthy: false, network: this.network, rpcUrl: this.rpcUrl, timestamp: Date.now(), error: errorMessage, }; } }
- src/index.ts:777-787 (handler)MCP server dispatch handler that invokes ZetrixClient.checkHealth() and formats response.case "zetrix_check_health": { const result = await zetrixClient.checkHealth(); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; }
- src/index.ts:61-68 (schema)Tool schema definition including name, description, and empty input schema (no parameters required).{ name: "zetrix_check_health", description: "Check the health status of the Zetrix node", inputSchema: { type: "object", properties: {}, }, },
- src/index.ts:768-770 (registration)Registration of tool list handler that exposes the tools array containing zetrix_check_health.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });