readarr_get_health
Check for health warnings and issues in Readarr to identify problems detected by the book management application.
Instructions
Get health check warnings and issues from Readarr (Books). Shows any problems detected by the application.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:830-853 (handler)Handler logic for the 'readarr_get_health' tool (shared with similar tools for other services). Extracts service name from tool name, retrieves the client instance, calls getHealth(), and returns formatted JSON response with issue count, details, and status.case "sonarr_get_health": case "radarr_get_health": case "lidarr_get_health": case "readarr_get_health": { const serviceName = name.split('_')[0] as keyof typeof clients; const client = clients[serviceName]; if (!client) throw new Error(`${serviceName} not configured`); const health = await client.getHealth(); return { content: [{ type: "text", text: JSON.stringify({ issueCount: health.length, issues: health.map(h => ({ source: h.source, type: h.type, message: h.message, wikiUrl: h.wikiUrl, })), status: health.length === 0 ? 'healthy' : 'issues detected', }, null, 2), }], }; }
- src/index.ts:117-125 (registration)Registration of the 'readarr_get_health' tool definition within the addConfigTools function. Dynamically creates the tool spec using 'readarr' as serviceName, including name, description, and empty input schema.{ name: `${serviceName}_get_health`, description: `Get health check warnings and issues from ${displayName}. Shows any problems detected by the application.`, inputSchema: { type: "object" as const, properties: {}, required: [], }, },
- src/index.ts:178-179 (registration)Conditional call to addConfigTools for 'readarr', which registers the 'readarr_get_health' tool if Readarr client is configured.if (clients.readarr) addConfigTools('readarr', 'Readarr (Books)');
- src/arr-client.ts:564-566 (helper)Core helper method getHealth() in ArrClient class (inherited by ReadarrClient) that performs the API request to the /health endpoint to retrieve health checks.async getHealth(): Promise<HealthCheck[]> { return this.request<HealthCheck[]>('/health'); }
- src/index.ts:79-81 (helper)Initialization of the ReadarrClient instance, required for the tool handler to access the configured Readarr service.case 'readarr': clients.readarr = new ReadarrClient(config); break;