Skip to main content
Glama

sonarr_get_health

Check Sonarr health status to identify warnings and issues detected by the TV show management application.

Instructions

Get health check warnings and issues from Sonarr (TV). Shows any problems detected by the application.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Primary handler for the sonarr_get_health tool. Matches the tool name in the switch statement, retrieves the SonarrClient instance, calls getHealth(), and formats the response as structured JSON 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), }], }; }
  • Tool schema definition for sonarr_get_health (and similar tools). Defines the name, description, and empty input schema (no parameters required). This is pushed to the TOOLS array dynamically when Sonarr is configured.
    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:174-178 (registration)
    Registration of configuration tools including sonarr_get_health. Calls addConfigTools('sonarr', ...) if Sonarr client is configured, which adds the tool to the global TOOLS array used for MCP tool listing.
    // Add config tools for each configured service (except Prowlarr which has different config) if (clients.sonarr) addConfigTools('sonarr', 'Sonarr (TV)'); if (clients.radarr) addConfigTools('radarr', 'Radarr (Movies)'); if (clients.lidarr) addConfigTools('lidarr', 'Lidarr (Music)'); if (clients.readarr) addConfigTools('readarr', 'Readarr (Books)');
  • Core implementation of health check retrieval in ArrClient base class (inherited by SonarrClient). Makes authenticated GET request to the /health API endpoint and returns array of HealthCheck objects.
    /** * Get health check issues */ async getHealth(): Promise<HealthCheck[]> { return this.request<HealthCheck[]>('/health'); }
  • SonarrClient class definition, which extends ArrClient and thus inherits the getHealth method used by the tool handler.
    export class SonarrClient extends ArrClient { constructor(config: ArrConfig) { super('sonarr', config); }

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/aplaceforallmystuff/mcp-arr'

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