Skip to main content
Glama

sonarr_get_queue

Retrieve the current download queue from Sonarr, with an optional limit on the number of entries returned.

Instructions

Get the current Sonarr download queue

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax results to return (default: 200)

Implementation Reference

  • The main handler function for the sonarr_get_queue tool. It calls ensureSonarr() to get the client, fetches the queue via client.getQueue(), and returns mapped items with fields like id, title, status, trackedDownloadStatus, trackedDownloadState, protocol, downloadClient, size, sizeleft, timeleft.
    async sonarrGetQueue(args: {
      limit?: number;
    } = {}): Promise<Record<string, unknown>> {
      const client = this.ensureSonarr();
      const limit = args.limit || ARR_PREVIEW_LIMIT;
      try {
        const queue = await client.getQueue();
        return {
          success: true,
          totalRecords: queue.totalRecords,
          items: queue.records.slice(0, limit).map((item) => ({
            id: item.id,
            title: item.title,
            status: item.status,
            trackedDownloadStatus: item.trackedDownloadStatus,
            trackedDownloadState: item.trackedDownloadState,
            protocol: item.protocol,
            downloadClient: item.downloadClient,
            size: item.size,
            sizeleft: item.sizeleft,
            timeleft: item.timeleft,
          })),
          showing: Math.min(limit, queue.records.length),
        };
      } catch (error) {
        return {
          success: false,
          error: error instanceof Error ? error.message : String(error),
        };
      }
    }
  • Input schema for sonarr_get_queue. Defines the tool name, description ('Get the current Sonarr download queue'), and inputSchema with a single optional 'limit' parameter (number, default 200).
    {
      name: "sonarr_get_queue",
      description: "Get the current Sonarr download queue",
      inputSchema: {
        type: "object" as const,
        properties: {
          limit: { type: "number", description: "Max results to return (default: 200)", default: 200 },
        },
      },
    },
  • Registration of sonarr_get_queue in the tool registry. Calls registry.register('sonarr_get_queue', ...) which delegates to arrFunctions.sonarrGetQueue() and wraps the result.
    registry.register("sonarr_get_queue", (args) =>
      arrFunctions.sonarrGetQueue({ limit: args.limit as number | undefined }).then(wrapResponse)
    );
  • The ARR_PREVIEW_LIMIT constant (value 200) used as the default limit when no explicit limit is provided.
    export const ARR_PREVIEW_LIMIT = 200;
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, and the description fails to disclose important behavioral traits such as read-only nature, result limits, or pagination behavior beyond what is implicit.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence, but it is overly minimal, missing potentially useful context without being verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple retrieval tool with no output schema, the description could mention that it returns the queue items or default behavior; current description is too sparse.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% for the single parameter, and the description adds no additional meaning beyond what the schema provides, so baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states 'Get the current Sonarr download queue', which clearly indicates the action and resource. It distinguishes from sibling tools like radarr_get_queue by the tool name, though no explicit differentiation is provided.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives or any context about prerequisites or limitations is provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/niavasha/plex-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server