Skip to main content
Glama

sonarr_get_series

Retrieve all TV shows from your Sonarr media library to view, manage, or organize your collection.

Instructions

Get all TV series in Sonarr library

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler for 'sonarr_get_series': checks if Sonarr client is configured, fetches series list using client.getSeries(), formats summary statistics into JSON response
    case "sonarr_get_series": {
      if (!clients.sonarr) throw new Error("Sonarr not configured");
      const series = await clients.sonarr.getSeries();
      return {
        content: [{
          type: "text",
          text: JSON.stringify({
            count: series.length,
            series: series.map(s => ({
              id: s.id,
              title: s.title,
              year: s.year,
              status: s.status,
              network: s.network,
              seasons: s.statistics?.seasonCount,
              episodes: s.statistics?.episodeFileCount + '/' + s.statistics?.totalEpisodeCount,
              sizeOnDisk: formatBytes(s.statistics?.sizeOnDisk || 0),
              monitored: s.monitored,
            })),
          }, null, 2),
        }],
      };
    }
  • Core implementation of SonarrClient.getSeries(): performs API GET request to '/api/v3/series' endpoint to retrieve all TV series
    async getSeries(): Promise<Series[]> {
      return this['request']<Series[]>('/series');
    }
  • src/index.ts:184-191 (registration)
    Registration of 'sonarr_get_series' tool: adds tool definition to TOOLS array (conditional on Sonarr client being configured), including name, description, and input schema
      name: "sonarr_get_series",
      description: "Get all TV series in Sonarr library",
      inputSchema: {
        type: "object" as const,
        properties: {},
        required: [],
      },
    },
  • TypeScript interface defining the structure of Series objects returned by Sonarr API
    export interface Series {
      id: number;
      title: string;
      sortTitle: string;
      status: string;
      overview: string;
      network: string;
      airTime: string;
      images: Array<{ coverType: string; url: string }>;
      seasons: Array<{ seasonNumber: number; monitored: boolean }>;
      year: number;
      path: string;
      qualityProfileId: number;
      seasonFolder: boolean;
      monitored: boolean;
      runtime: number;
      tvdbId: number;
      tvRageId: number;
      tvMazeId: number;
      firstAired: string;
      seriesType: string;
      cleanTitle: string;
      imdbId: string;
      titleSlug: string;
      genres: string[];
      tags: number[];
      added: string;
      ratings: { votes: number; value: number };
      statistics: {
        seasonCount: number;
        episodeFileCount: number;
        episodeCount: number;
        totalEpisodeCount: number;
        sizeOnDisk: number;
        percentOfEpisodes: number;
      };
    }
  • Base ArrClient.request() method: handles all API requests with authentication, error handling, and JSON parsing used by getSeries()
    protected async request<T>(endpoint: string, options: RequestInit = {}): Promise<T> {
      const url = `${this.config.url}/api/${this.apiVersion}${endpoint}`;
      const headers: Record<string, string> = {
        'Content-Type': 'application/json',
        'X-Api-Key': this.config.apiKey,
        ...(options.headers as Record<string, string> || {}),
      };
    
      const response = await fetch(url, {
        ...options,
        headers,
      });
    
      if (!response.ok) {
        const text = await response.text();
        throw new Error(`${this.serviceName} API error: ${response.status} ${response.statusText} - ${text}`);
      }
    
      return response.json() as Promise<T>;
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states it 'gets' data (implying read-only), but doesn't mention pagination, rate limits, authentication requirements, response format, or whether it returns all series at once. For a data retrieval tool with zero annotation coverage, this leaves significant behavioral questions unanswered.

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, efficient sentence that communicates the core purpose without any wasted words. It's appropriately sized for a simple retrieval tool and gets straight to the point.

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?

For a zero-parameter read operation, the description covers the basic purpose adequately. However, with no annotations and no output schema, it doesn't address important behavioral aspects like response format, pagination, or error conditions. The description meets minimum viability but leaves gaps in understanding how the tool actually behaves.

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

Parameters4/5

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

The tool has zero parameters with 100% schema description coverage, so the schema already fully documents the parameter situation. The description appropriately doesn't discuss parameters since none exist, earning a baseline 4 for not creating confusion about non-existent parameters.

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 clearly states the action ('Get') and resource ('all TV series in Sonarr library'), making the tool's purpose immediately understandable. It doesn't explicitly differentiate from siblings like 'sonarr_get_episodes' or 'sonarr_search', but the specificity of 'all TV series' provides reasonable distinction.

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?

The description provides no guidance on when to use this tool versus alternatives like 'sonarr_search' or 'sonarr_get_episodes'. There's no mention of prerequisites, context, or comparison with sibling tools that might serve similar purposes.

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/aplaceforallmystuff/mcp-arr'

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