Skip to main content
Glama

sonarr_search

Search for TV series by name, returning the tvdbId needed to add them to Sonarr.

Instructions

Search for TV series by name. Returns results with tvdbId needed for sonarr_add_series.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
termYesSearch term (show name)

Implementation Reference

  • Tool schema registration for 'sonarr_search' - defines the input schema requiring a 'term' (show name) string parameter to search TV series in Sonarr.
      name: "sonarr_search",
      description: "Search for TV series by name. Returns results with tvdbId needed for sonarr_add_series.",
      inputSchema: {
        type: "object" as const,
        properties: {
          term: {
            type: "string",
            description: "Search term (show name)",
          },
        },
        required: ["term"],
      },
    },
  • Handler implementation for 'sonarr_search' - validates Sonarr is configured, extracts the 'term' argument, calls clients.sonarr.searchSeries(term), and returns results with title, year, tvdbId, and overview.
    case "sonarr_search": {
      if (!clients.sonarr) throw new Error("Sonarr not configured");
      const term = (args as { term: string }).term;
      const results = await clients.sonarr.searchSeries(term);
      return {
        content: [{
          type: "text",
          text: JSON.stringify({
            count: results.length,
            results: results.slice(0, 10).map(r => ({
              title: r.title,
              year: r.year,
              tvdbId: r.tvdbId,
              overview: r.overview?.substring(0, 200) + (r.overview && r.overview.length > 200 ? '...' : ''),
            })),
          }, null, 2),
        }],
      };
    }
  • SonarrClient.searchSeries() - helper method that makes the API call to Sonarr's /series/lookup endpoint to search for TV series by name.
    async searchSeries(term: string): Promise<SearchResult[]> {
      return this['request']<SearchResult[]>(`/series/lookup?term=${encodeURIComponent(term)}`);
    }
Behavior2/5

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

No annotations are provided, so the description bears the full burden of disclosing behavioral traits. It does not mention potential behaviors such as rate limiting, authentication requirements, result limits, pagination, or behavior when no results are found. The only behavioral detail is that results include tvdbId, which is useful but insufficient for full transparency.

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 consists of two short, clear sentences. The first sentence states the core function, and the second explains the value of the output (tvdbId for another tool). There is no extraneous information; every word contributes to clarity.

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 tool's simplicity (single parameter, no output schema), the description is reasonably complete. It covers the action (search), the input (name), and the key output element (tvdbId) and its usage. However, it does not specify that the result might be a list of series or mention any other fields returned, which could be inferred but not explicitly stated.

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% coverage with a description of the 'term' parameter. The description adds value by explaining that the search is for TV series by name and that the results contain tvdbId needed for sonarr_add_series. This provides context beyond the schema, helping an agent understand the parameter's purpose and the output's downstream use.

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 tool searches for TV series by name and returns tvdbId, which is needed for sonarr_add_series. This distinguishes it from sibling tools like sonarr_search_episode (which searches episodes) and sonarr_search_missing (which searches missing episodes). However, it does not explicitly differentiate from radarr_search or lidarr_search, though the mention of 'TV series' and specific use case helps.

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

Usage Guidelines3/5

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

The description implies usage when needing to find a TV series and obtain its tvdbId for adding via sonarr_add_series. However, it does not provide explicit guidance on when not to use this tool (e.g., for episode-specific searches) or mention alternatives among the many sibling search tools. The context of 'needed for sonarr_add_series' gives a clear reason to use, but more explicit when/when-not language would improve this.

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