Skip to main content
Glama

readarr_get_download_clients

Retrieve configured download client settings from Readarr to manage book downloads and monitor transfer status.

Instructions

Get download client configurations from Readarr (Books). Shows configured clients and their settings.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.ts:136-143 (registration)
    Dynamically registers the 'readarr_get_download_clients' tool (via `${serviceName}` where serviceName='readarr') in the TOOLS array, including schema and description.
    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: [], }, },
  • MCP server handler for 'readarr_get_download_clients': extracts service, calls client.getDownloadClients(), formats and returns 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), }], }; }
  • ReadarrClient.getDownloadClients(): Makes authenticated API GET request to /api/v1/downloadclient endpoint.
    async getDownloadClients(): Promise<DownloadClient[]> { return this.request<DownloadClient[]>('/downloadclient'); }
  • TypeScript interface defining the structure of DownloadClient objects fetched and returned by the tool.
    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[]; }
  • Base ArrClient.request(): HTTP client method that performs authenticated fetch to Readarr API, used by getDownloadClients().
    protected async request<T>(endpoint: string, options: RequestInit = {}): Promise<T> { const url = `${this.config.url}/api/${this.apiVersion}${endpoint}`; const headers: Record<string, string> = { 'Content-Type': 'application/json', 'X-Api-Key': this.config.apiKey, ...(options.headers as Record<string, string> || {}), }; const response = await fetch(url, { ...options, headers, }); if (!response.ok) { const text = await response.text(); throw new Error(`${this.serviceName} API error: ${response.status} ${response.statusText} - ${text}`); } return response.json() as Promise<T>; }

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