sonarr_get_download_clients
Retrieve configured download client settings from Sonarr to manage TV show downloads and monitor download progress.
Instructions
Get download client configurations from Sonarr (TV). Shows configured clients and their settings.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:136-143 (registration)Registration and schema definition for the sonarr_get_download_clients tool (dynamically generated with serviceName='sonarr' in addConfigTools function). Defines name, description, and empty input schema.name: `${serviceName}_get_download_clients`, description: `Get download client configurations from ${displayName}. Shows configured clients and their settings.`, inputSchema: { type: "object" as const, properties: {}, required: [], }, },
- src/index.ts:883-910 (handler)Primary handler logic for executing sonarr_get_download_clients. Dispatches to SonarrClient.getDownloadClients(), processes results, and returns formatted JSON response.case "sonarr_get_download_clients": case "radarr_get_download_clients": case "lidarr_get_download_clients": case "readarr_get_download_clients": { const serviceName = name.split('_')[0] as keyof typeof clients; const client = clients[serviceName]; if (!client) throw new Error(`${serviceName} not configured`); const downloadClients = await client.getDownloadClients(); return { content: [{ type: "text", text: JSON.stringify({ count: downloadClients.length, clients: downloadClients.map(c => ({ id: c.id, name: c.name, implementation: c.implementationName, protocol: c.protocol, enabled: c.enable, priority: c.priority, removeCompletedDownloads: c.removeCompletedDownloads, removeFailedDownloads: c.removeFailedDownloads, tags: c.tags, })), }, null, 2), }], }; }
- src/arr-client.ts:543-545 (helper)Core implementation in ArrClient base class: makes API request to /downloadclient endpoint to fetch download client configurations.async getDownloadClients(): Promise<DownloadClient[]> { return this.request<DownloadClient[]>('/downloadclient'); }
- src/arr-client.ts:326-342 (schema)TypeScript interface defining the structure of download client data returned by the API.export interface DownloadClient { id: number; name: string; implementation: string; implementationName: string; configContract: string; enable: boolean; protocol: string; priority: number; removeCompletedDownloads: boolean; removeFailedDownloads: boolean; fields: Array<{ name: string; value: unknown; }>; tags: number[]; }
- src/index.ts:174-176 (registration)Explicit registration call for Sonarr config tools, including sonarr_get_download_clients.// 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)');