Skip to main content
Glama

sonarr_get_series

Retrieve a list of series from Sonarr, optionally filtered by title substring.

Instructions

List all series in Sonarr with optional title filter

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filterNoOptional title substring filter
limitNoMax results to return (default: 200)

Implementation Reference

  • The main handler function that executes the 'sonarr_get_series' tool logic. It initializes the Sonarr client, optionally filters series by title, and returns a sliced/previewed list of series with key statistics.
    async sonarrGetSeries(args: {
      filter?: string;
      limit?: number;
    }): Promise<Record<string, unknown>> {
      const client = this.ensureSonarr();
      const limit = args.limit || ARR_PREVIEW_LIMIT;
      try {
        let series = await client.getSeries();
        if (args.filter) {
          const f = args.filter.toLowerCase();
          series = series.filter((s) => s.title.toLowerCase().includes(f));
        }
        return {
          success: true,
          totalSeries: series.length,
          series: series.slice(0, limit).map((s) => ({
            id: s.id,
            title: s.title,
            year: s.year,
            status: s.status,
            network: s.network,
            monitored: s.monitored,
            seasons: s.statistics.seasonCount,
            episodeFileCount: s.statistics.episodeFileCount,
            episodeCount: s.statistics.episodeCount,
            percentOfEpisodes: s.statistics.percentOfEpisodes,
            sizeOnDisk: s.statistics.sizeOnDisk,
            tvdbId: s.tvdbId,
            imdbId: s.imdbId,
            overview: s.overview ? truncate(s.overview, SUMMARY_PREVIEW_LENGTH) : undefined,
          })),
          showing: Math.min(limit, series.length),
        };
      } catch (error) {
        return {
          success: false,
          error: error instanceof Error ? error.message : String(error),
        };
      }
    }
  • Input schema definition for sonarr_get_series, declaring optional 'filter' (string) and 'limit' (number) parameters with descriptions.
    {
      name: "sonarr_get_series",
      description: "List all series in Sonarr with optional title filter",
      inputSchema: {
        type: "object" as const,
        properties: {
          filter: { type: "string", description: "Optional title substring filter" },
          limit: { type: "number", description: "Max results to return (default: 200)", default: 200 },
        },
      },
    },
  • Registration of sonarr_get_series in the tool registry, mapping the tool name to a call to arrFunctions.sonarrGetSeries with args extraction.
    registry.register("sonarr_get_series", (args) =>
      arrFunctions.sonarrGetSeries({ filter: args.filter as string | undefined, limit: args.limit as number | undefined }).then(wrapResponse)
    );
Behavior2/5

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

No annotations are provided, so the description must disclose behavioral traits. It only states the basic operation, omitting details like pagination (though limit is in schema), rate limits, or what fields are returned. This is insufficient for a read operation.

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

Conciseness5/5

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

The description is a single concise sentence with no wasted words. It is front-loaded with the main purpose and includes the key optional param.

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

Completeness3/5

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

Given no output schema and no annotations, the description is minimal. It explains the basic functionality but lacks context about returned data structure, default behavior, or edge cases. Adequate for a simple list but has gaps.

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% with descriptions for both parameters. The description's 'optional title filter' is less specific than the schema's 'title substring filter'. It does not add extra meaning beyond the schema, so baseline 3 is appropriate.

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

Purpose5/5

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

The description clearly states the tool lists all series in Sonarr with an optional title filter. This is specific verb+resource, and distinguishes from sibling tools like sonarr_add_series or sonarr_get_missing.

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

Usage Guidelines3/5

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

The description implies usage for listing series with optional filtering but provides no guidance on when to use this vs alternatives like sonarr_search or other series-related tools. No explicit when-not or alternative suggestions.

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