Skip to main content
Glama

sonarr_search_missing

Search for all missing episodes in a specific TV series to complete your media library collection.

Instructions

Trigger a search for all missing episodes in a series

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seriesIdYesSeries ID to search for missing episodes

Implementation Reference

  • Core handler in SonarrClient that triggers a POST to /command with 'SeriesSearch' for the given seriesId, searching for all missing episodes.
    async searchMissing(seriesId: number): Promise<{ id: number }> {
      return this['request']<{ id: number }>('/command', {
        method: 'POST',
        body: JSON.stringify({
          name: 'SeriesSearch',
          seriesId,
        }),
      });
    }
  • src/index.ts:248-259 (registration)
    Tool registration in TOOLS array, including name, description, and inputSchema for sonarr_search_missing.
    name: "sonarr_search_missing",
    description: "Trigger a search for all missing episodes in a series",
    inputSchema: {
      type: "object" as const,
      properties: {
        seriesId: {
          type: "number",
          description: "Series ID to search for missing episodes",
        },
      },
      required: ["seriesId"],
    },
  • MCP server handler that validates Sonarr client availability, extracts seriesId from args, calls SonarrClient.searchMissing, and formats success response with commandId.
    case "sonarr_search_missing": {
      if (!clients.sonarr) throw new Error("Sonarr not configured");
      const seriesId = (args as { seriesId: number }).seriesId;
      const result = await clients.sonarr.searchMissing(seriesId);
      return {
        content: [{
          type: "text",
          text: JSON.stringify({
            success: true,
            message: `Search triggered for missing episodes`,
            commandId: result.id,
          }, null, 2),
        }],
      };
    }

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