health_check
Confirm that the local REST API is reachable and the renderer is ready, ensuring reliable integration with Super Productivity.
Instructions
Checks whether the Super Productivity local REST API is reachable and the renderer is ready.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/tasks.ts:62-69 (handler)The actual handler function for the 'health_check' tool. Calls SpClient.health() and returns the result via the ok() helper.
server.tool( "health_check", "Checks whether the Super Productivity local REST API is reachable and the renderer is ready.", {}, async () => { const health = await SpClient.health(); return ok(health); } - src/sp-client.ts:57-60 (schema)Zod schema for the health check response: validates server (string) and rendererReady (boolean).
const HealthStatusSchema = z.object({ server: z.string(), rendererReady: z.boolean(), }).passthrough(); - src/sp-client.ts:202-204 (helper)SpClient.health() - Makes the actual HTTP request to the /health endpoint and returns a HealthStatus object.
health(): Promise<HealthStatus> { return request("/health", HealthStatusSchema); }, - src/index.ts:16-16 (registration)Registration of all task tools (including health_check) by calling registerTaskTools(server).
registerTaskTools(server); - src/sp-client.ts:194-197 (schema)TypeScript interface for the health check response: server (string) and rendererReady (boolean).
export interface HealthStatus { server: string; rendererReady: boolean; }