Skip to main content
Glama

sonarr_add_series

Add a TV series to Sonarr by providing TVDB ID, title, quality profile, and root folder. Optionally set monitoring, season folders, and tags.

Instructions

Add a TV series to Sonarr. Use sonarr_search first to find the tvdbId, and sonarr_get_root_folders / sonarr_get_quality_profiles to get valid values for rootFolderPath and qualityProfileId. Use sonarr_get_tags to get valid tag IDs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tvdbIdYesTVDB ID from sonarr_search results
titleYesSeries title
qualityProfileIdYesQuality profile ID from sonarr_get_quality_profiles
rootFolderPathYesRoot folder path from sonarr_get_root_folders
monitoredNoWhether to monitor the series (default: true)
seasonFolderNoWhether to use season folders (default: true)
tagsNoArray of tag IDs from sonarr_get_tags (optional)

Implementation Reference

  • src/index.ts:337-375 (registration)
    Tool registration (schema definition) for sonarr_add_series in the TOOLS array, defining input parameters: tvdbId, title, qualityProfileId, rootFolderPath (required), and optional monitored, seasonFolder, tags.
    {
      name: "sonarr_add_series",
      description: "Add a TV series to Sonarr. Use sonarr_search first to find the tvdbId, and sonarr_get_root_folders / sonarr_get_quality_profiles to get valid values for rootFolderPath and qualityProfileId. Use sonarr_get_tags to get valid tag IDs.",
      inputSchema: {
        type: "object" as const,
        properties: {
          tvdbId: {
            type: "number",
            description: "TVDB ID from sonarr_search results",
          },
          title: {
            type: "string",
            description: "Series title",
          },
          qualityProfileId: {
            type: "number",
            description: "Quality profile ID from sonarr_get_quality_profiles",
          },
          rootFolderPath: {
            type: "string",
            description: "Root folder path from sonarr_get_root_folders",
          },
          monitored: {
            type: "boolean",
            description: "Whether to monitor the series (default: true)",
          },
          seasonFolder: {
            type: "boolean",
            description: "Whether to use season folders (default: true)",
          },
          tags: {
            type: "array",
            items: { type: "number" },
            description: "Array of tag IDs from sonarr_get_tags (optional)",
          },
        },
        required: ["tvdbId", "title", "qualityProfileId", "rootFolderPath"],
      },
    },
  • Handler for the sonarr_add_series tool call in the CallToolRequestSchema switch statement. Validates Sonarr is configured, extracts args, calls SonarrClient.addSeries(), and returns success response.
    case "sonarr_add_series": {
      if (!clients.sonarr) throw new Error("Sonarr not configured");
      const { tvdbId, title, qualityProfileId, rootFolderPath, monitored, seasonFolder, tags } = args as {
        tvdbId: number; title: string; qualityProfileId: number; rootFolderPath: string;
        monitored?: boolean; seasonFolder?: boolean; tags?: number[];
      };
      const added = await clients.sonarr.addSeries({
        tvdbId, title, qualityProfileId, rootFolderPath, monitored, seasonFolder, tags: tags ?? [],
      });
      return {
        content: [{
          type: "text",
          text: JSON.stringify({
            success: true,
            message: `Added "${added.title}" (${added.year}) to Sonarr`,
            id: added.id,
            path: added.path,
            monitored: added.monitored,
          }, null, 2),
        }],
      };
    }
  • SonarrClient.addSeries() method - the actual API call. Sends a POST request to /series with the series data, defaulting monitored to true, seasonFolder to true, and setting searchForMissingEpisodes to true.
    async addSeries(series: Partial<Series> & { tvdbId: number; rootFolderPath: string; qualityProfileId: number }): Promise<Series> {
      return this['request']<Series>('/series', {
        method: 'POST',
        body: JSON.stringify({
          ...series,
          monitored: series.monitored ?? true,
          seasonFolder: series.seasonFolder ?? true,
          addOptions: {
            searchForMissingEpisodes: true,
          },
        }),
      });
    }
Behavior3/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 'Add', without explaining idempotency, duplicate handling, error scenarios, or return value. While it mentions dependencies, the behavioral context is minimal for a write 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 extremely concise, with three sentences that deliver critical usage guidance without any redundancy or filler. Every sentence adds value.

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

Completeness4/5

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

Given the lack of output schema and annotations, the description adequately covers how to obtain all required parameter values from other tools. However, it does not explain the outcome of the addition (e.g., series created, episodes scheduled) or how optional parameters like monitored and seasonFolder behave. Still, it provides sufficient context for an agent to invoke the tool correctly.

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 input schema covers all parameters with descriptions (100% coverage). The description adds value by telling the agent which sibling tools to use to obtain each parameter's value (e.g., tvdbId from sonarr_search). This extra guidance improves parameter semantics beyond the schema.

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 action 'Add a TV series to Sonarr', which is a specific verb-resource pair. It distinguishes this tool from sibling tools like sonarr_search and sonarr_get_series by focusing on the creation operation.

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

Usage Guidelines5/5

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

The description explicitly tells the agent to first use sonarr_search to find the tvdbId, and to use sonarr_get_root_folders, sonarr_get_quality_profiles, and sonarr_get_tags to obtain valid values for parameters. This provides clear prerequisites and when to use this tool versus alternatives.

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