Skip to main content
Glama

sonarr_search_episode

Search for specific TV episodes using their episode IDs to locate and download content through Sonarr media management.

Instructions

Trigger a search for specific episode(s)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
episodeIdsYesEpisode ID(s) to search for

Implementation Reference

  • Core implementation of sonarr_search_episode: Posts 'EpisodeSearch' command to Sonarr API with episode IDs.
    async searchEpisode(episodeIds: number[]): Promise<{ id: number }> {
      return this['request']<{ id: number }>('/command', {
        method: 'POST',
        body: JSON.stringify({
          name: 'EpisodeSearch',
          episodeIds,
        }),
      });
    }
  • src/index.ts:262-275 (registration)
    Tool registration in TOOLS array, including name, description, and input schema definition.
      name: "sonarr_search_episode",
      description: "Trigger a search for specific episode(s)",
      inputSchema: {
        type: "object" as const,
        properties: {
          episodeIds: {
            type: "array",
            items: { type: "number" },
            description: "Episode ID(s) to search for",
          },
        },
        required: ["episodeIds"],
      },
    }
  • MCP server dispatch handler that validates Sonarr config, extracts arguments, calls SonarrClient.searchEpisode, and formats response.
    case "sonarr_search_episode": {
      if (!clients.sonarr) throw new Error("Sonarr not configured");
      const episodeIds = (args as { episodeIds: number[] }).episodeIds;
      const result = await clients.sonarr.searchEpisode(episodeIds);
      return {
        content: [{
          type: "text",
          text: JSON.stringify({
            success: true,
            message: `Search triggered for ${episodeIds.length} episode(s)`,
            commandId: result.id,
          }, null, 2),
        }],
      };
    }
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the action ('trigger a search') without disclosing behavioral traits like whether this is a read-only or mutating operation, authentication needs, rate limits, or what 'trigger' implies (e.g., asynchronous, immediate). It lacks details on outcomes, errors, or side effects, which is a significant gap for a tool with zero annotation coverage.

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 with zero waste—'Trigger a search for specific episode(s)'—that directly states the tool's purpose. It's appropriately sized and front-loaded, making it easy to parse quickly.

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?

Given the tool's complexity (involving a search operation with no output schema and no annotations), the description is incomplete. It doesn't explain what the search does (e.g., finds downloads, updates metadata), the return values, or behavioral context. With no annotations or output schema, the description should provide more detail to be adequately helpful.

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?

The input schema has 100% description coverage, with 'episodeIds' clearly documented as 'Episode ID(s) to search for'. The description adds no additional meaning beyond this, as it doesn't explain the format, source, or constraints of episode IDs. With high schema coverage, the baseline is 3, and the description doesn't compensate further.

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

Purpose3/5

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

The description 'Trigger a search for specific episode(s)' clearly states the action (search) and target (episodes), but it's vague about what 'search' entails (e.g., for downloads, metadata, availability) and doesn't differentiate from siblings like 'sonarr_search' or 'sonarr_search_missing'. It specifies 'specific episode(s)' via episodeIds, which adds some specificity.

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 is provided on when to use this tool versus alternatives such as 'sonarr_search' or 'sonarr_search_missing'. The description implies it's for searching episodes, but there's no explicit context, exclusions, or prerequisites mentioned, leaving the agent to infer usage based on sibling names alone.

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