hyperd.health.check
Verify hyperD API health by reviewing network status, payment facilitator configuration, backend key wiring, and cache statistics. No wallet required.
Instructions
Check the health of the hyperD API: which network it's on, whether the payment facilitator is configured, which optional backend keys are wired, and cache stats. FREE — no wallet required.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.ts:184-190 (registration)Registration of the 'hyperd.health.check' MCP tool via server.tool(). It has no input schema ({}), description mentions checking API health, network, payment facilitator config, backend keys, and cache stats. No wallet required — free tool.
// hyperd.health.check — service liveness (free) server.tool( "hyperd.health.check", "Check the health of the hyperD API: which network it's on, whether the payment facilitator is configured, which optional backend keys are wired, and cache stats. FREE — no wallet required.", {}, async () => asText(await freeGet("/api/health")), ); - src/server.ts:64-77 (handler)The freeGet handler function called by the hyperd.health.check tool. It makes a plain HTTP GET request to the hyperD API at the given path (here '/api/health') and returns the JSON response. No x402 payment required.
async function freeGet( path: string, query: Record<string, string | number | boolean | undefined> = {}, ): Promise<unknown> { const url = new URL(`${API_BASE}${path}`); for (const [k, v] of Object.entries(query)) { if (v !== undefined && v !== "" && v !== null) url.searchParams.set(k, String(v)); } const r = await fetch(url); if (!r.ok) { throw new Error(`HTTP ${r.status} on free request: ${await r.text()}`); } return r.json(); } - src/server.ts:155-157 (helper)The asText helper function that wraps the API JSON response into MCP text content format.
function asText(data: unknown) { return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] }; }