readarr_get_queue
Retrieve the current download queue from Readarr to monitor pending book downloads and track progress within your media management system.
Instructions
Get Readarr download queue
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:1463-1481 (handler)Main handler for the 'readarr_get_queue' tool. Checks if Readarr client is configured, calls getQueue() on the client, processes queue items to include progress percentage, and returns formatted JSON response as text content.case "readarr_get_queue": { if (!clients.readarr) throw new Error("Readarr not configured"); const queue = await clients.readarr.getQueue(); return { content: [{ type: "text", text: JSON.stringify({ totalRecords: queue.totalRecords, items: queue.records.map(q => ({ title: q.title, status: q.status, progress: ((1 - q.sizeleft / q.size) * 100).toFixed(1) + '%', timeLeft: q.timeleft, downloadClient: q.downloadClient, })), }, null, 2), }], }; }
- src/index.ts:466-473 (registration)Tool registration in the TOOLS array. Defines the tool name, description, and empty input schema (no parameters required).name: "readarr_get_queue", description: "Get Readarr download queue", inputSchema: { type: "object" as const, properties: {}, required: [], }, },
- src/arr-client.ts:32-47 (schema)TypeScript interface defining the structure of individual queue items returned by the Readarr /queue API endpoint.export interface QueueItem { id: number; title: string; status: string; trackedDownloadStatus: string; trackedDownloadState: string; statusMessages: Array<{ title: string; messages: string[] }>; downloadId: string; protocol: string; downloadClient: string; outputPath: string; sizeleft: number; size: number; timeleft: string; estimatedCompletionTime: string; }
- src/arr-client.ts:492-494 (helper)Core helper method in ArrClient base class (inherited by ReadarrClient) that performs the HTTP request to the Readarr API /queue endpoint with parameters to include unknown items.async getQueue(): Promise<{ records: QueueItem[]; totalRecords: number }> { return this.request<{ records: QueueItem[]; totalRecords: number }>('/queue?includeUnknownSeriesItems=true&includeUnknownMovieItems=true'); }
- src/index.ts:79-81 (registration)Initializes the ReadarrClient instance from environment variables if READARR_URL and READARR_API_KEY are set, making the readarr_get_queue tool available.case 'readarr': clients.readarr = new ReadarrClient(config); break;