queue_grab
Force retry downloads of queued media items by specifying service and IDs to resolve stalled or failed transfers in media management workflows.
Instructions
Force grab/retry download of queued items
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ids | Yes | ||
| service | Yes |
Implementation Reference
- src/services/shared.ts:245-279 (handler)Core implementation of the queue_grab tool. Makes API calls to Sonarr/Radarr /queue/grab endpoints to force download/retry queued items, handling single or bulk IDs.async queueGrab(ids: number[]): Promise<OperationResult<GrabData>> { debugOperation(this.serviceName, "queueGrab", { ids: ids.slice(0, 5), count: ids.length, }); try { if (ids.length === 0) { throw new Error("No IDs provided"); } if (ids.length === 1) { await fetchJson(this.buildApiUrl(`/queue/grab/${ids[0]}`), { method: "POST", }); } else { await fetchJson(this.buildApiUrl("/queue/grab/bulk"), { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ ids }), }); } return { ok: true, data: { service: this.serviceName, mediaKind: this.mediaKind, grabbed: ids.length, ids, }, }; } catch (error) { return handleError(error, this.serviceName); } }
- src/index.ts:53-62 (schema)MCP tool schema definition including input schema requiring 'service' and 'ids' array.name: "queue_grab", description: "Force grab/retry download of queued items", inputSchema: { type: "object", properties: { service: { type: "string" }, ids: { type: "array", items: { type: "number" } }, }, required: ["service", "ids"], },
- src/index.ts:282-289 (registration)Tool registration and dispatch in the main switch statement, validating input and calling service.queueGrab.case "queue_grab": if (!input.ids || input.ids.length === 0) { throw new McpError( ErrorCode.InvalidParams, "Missing or empty ids array", ); } return await service.queueGrab(input.ids);
- src/services/base.ts:59-64 (schema)Type definition for the GrabData return type used by queueGrab.export interface GrabData { service: string; mediaKind: "series" | "movie"; grabbed: number; ids: number[]; }
- src/services/base.ts:244-244 (helper)Interface declaration for the queueGrab method in ServiceImplementation.queueGrab(ids: number[]): Promise<OperationResult<GrabData>>;