lidarr_get_queue
Retrieve the current download queue from Lidarr to monitor pending music acquisition tasks and track download progress within your media management system.
Instructions
Get Lidarr download queue
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:372-379 (registration)Registration of the lidarr_get_queue tool in the TOOLS array, including its schema (empty input, no params). Added conditionally if Lidarr client is configured.name: "lidarr_get_queue", description: "Get Lidarr download queue", inputSchema: { type: "object" as const, properties: {}, required: [], }, },
- src/arr-client.ts:32-47 (schema)Type definition for QueueItem, the structure of items returned by the Lidarr queue API.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/index.ts:1321-1339 (handler)MCP tool handler for lidarr_get_queue: checks Lidarr config, calls client.getQueue(), formats response with progress percentages and returns as text/JSON.case "lidarr_get_queue": { if (!clients.lidarr) throw new Error("Lidarr not configured"); const queue = await clients.lidarr.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/arr-client.ts:489-494 (handler)Implementation of getQueue() in base ArrClient class (inherited by LidarrClient). Performs authenticated API GET to /queue endpoint with params for unknown items./** * Get download queue */ async getQueue(): Promise<{ records: QueueItem[]; totalRecords: number }> { return this.request<{ records: QueueItem[]; totalRecords: number }>('/queue?includeUnknownSeriesItems=true&includeUnknownMovieItems=true'); }
- src/arr-client.ts:729-733 (helper)LidarrClient class extending ArrClient, sets service name 'lidarr' and API version 'v1'. Instantiated in index.ts if LIDARR_URL/API_KEY env vars are set.export class LidarrClient extends ArrClient { constructor(config: ArrConfig) { super('lidarr', config); this.apiVersion = 'v1'; }