Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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: [], }, },
  • 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; }
  • 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'); }
  • 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'; }

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