readarr_get_queue
Retrieve the current download queue for books in Readarr to monitor pending downloads and track import progress.
Instructions
Get Readarr download queue
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:1463-1481 (handler)Handler for 'readarr_get_queue' tool: checks if Readarr client is configured, calls getQueue(), formats and returns queue items with progress and status.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)Registration of 'readarr_get_queue' tool in TOOLS array, including name, description, and empty input schema. Added conditionally if Readarr client configured.name: "readarr_get_queue", description: "Get Readarr download queue", inputSchema: { type: "object" as const, properties: {}, required: [], }, },
- src/arr-client.ts:32-47 (schema)Type definition for QueueItem used in getQueue response across all Arr clients, including fields like title, status, progress components (sizeleft/size), and timeleft.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 getQueue method in ArrClient (inherited by ReadarrClient): makes API request to /queue endpoint with params for unknown items.async getQueue(): Promise<{ records: QueueItem[]; totalRecords: number }> { return this.request<{ records: QueueItem[]; totalRecords: number }>('/queue?includeUnknownSeriesItems=true&includeUnknownMovieItems=true'); }
- src/arr-client.ts:832-836 (helper)ReadarrClient class extending ArrClient, setting service to 'readarr' and API version to 'v1', providing the client instance used by the handler.export class ReadarrClient extends ArrClient { constructor(config: ArrConfig) { super('readarr', config); this.apiVersion = 'v1'; }