Skip to main content
Glama

sonarr_trigger_search

Trigger a search for missing episodes in Sonarr, with an option to target a specific series.

Instructions

Trigger a search for missing episodes, optionally for a specific series

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seriesIdNoSonarr series ID (omit to search all missing)

Implementation Reference

  • Main handler: sonarrTriggerSearch method on ArrMCPFunctions class. Calls client.triggerSeriesSearch(seriesId) if seriesId is provided, otherwise calls client.triggerMissingSearch() for all missing episodes. Returns success/error response.
    async sonarrTriggerSearch(args: {
      seriesId?: number;
    }): Promise<Record<string, unknown>> {
      const client = this.ensureSonarr();
      try {
        if (args.seriesId) {
          const result = await client.triggerSeriesSearch(args.seriesId);
          return {
            success: true,
            commandId: result.id,
            message: `Triggered search for series ${args.seriesId}`,
          };
        }
        const result = await client.triggerMissingSearch();
        return {
          success: true,
          commandId: result.id,
          message: "Triggered search for all missing episodes",
        };
      } catch (error) {
        return {
          success: false,
          error: error instanceof Error ? error.message : String(error),
        };
      }
    }
  • Schema definition for sonarr_trigger_search tool with optional seriesId input parameter.
      name: "sonarr_trigger_search",
      description: "Trigger a search for missing episodes, optionally for a specific series",
      inputSchema: {
        type: "object" as const,
        properties: {
          seriesId: { type: "number", description: "Sonarr series ID (omit to search all missing)" },
        },
      },
    },
  • Registration of 'sonarr_trigger_search' in the tool registry, mapping to arrFunctions.sonarrTriggerSearch with argument casting.
    registry.register("sonarr_trigger_search", (args) =>
      arrFunctions.sonarrTriggerSearch({
        seriesId: args.seriesId as number | undefined,
      }).then(wrapResponse)
    );
  • Low-level API client methods: triggerSeriesSearch (POST /command with name 'SeriesSearch') and triggerMissingSearch (POST /command with name 'MissingEpisodeSearch') used by the handler.
    async triggerSeriesSearch(seriesId: number): Promise<{ id: number }> {
      const { data } = await this.http.post<{ id: number }>("/command", {
        name: "SeriesSearch",
        seriesId,
      });
      return data;
    }
    
    async triggerMissingSearch(): Promise<{ id: number }> {
      const { data } = await this.http.post<{ id: number }>("/command", {
        name: "MissingEpisodeSearch",
      });
      return data;
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of disclosing behavioral traits. It only states 'trigger a search' but does not explain whether this is asynchronous, if it returns immediately, what side effects occur (e.g., queuing tasks), or if it's safe to repeat. This lack of detail limits the agent's understanding of consequences.

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, front-loaded sentence of 13 words. It efficiently conveys the core action and parameter option without any verbose or redundant phrasing.

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 the lack of output schema and annotations, the description is minimal. It covers the basic function but omits important context like whether the search runs in the background, expected delays, or how to check results. For a trigger action, this is adequate but not thorough.

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 has 100% schema description coverage, but the description adds value by explaining that omitting 'seriesId' triggers a search for all missing episodes. This clarifies the parameter's optionality and behavior beyond the schema's basic 'Sonarr series ID'.

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 verb 'trigger a search' and the resource 'missing episodes', with an optional scope 'for a specific series'. This distinguishes it from sibling tools like sonarr_search or radarr_trigger_search by specifying Sonarr and the objective (searching for missing episodes).

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 does not provide any guidance on when to use this tool versus alternatives (e.g., sonarr_search or radarr_trigger_search). It only mentions the optional parameter but lacks context on prerequisites, expected scenarios, or exclusions.

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