Skip to main content
Glama

sonarr_get_calendar

Retrieve upcoming TV episodes from Sonarr to monitor release schedules and plan media management.

Instructions

Get upcoming TV episodes from Sonarr

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNoNumber of days to look ahead (default: 7)

Implementation Reference

  • MCP tool handler for sonarr_get_calendar: computes date range from optional 'days' parameter (default 7), calls SonarrClient.getCalendar(start, end), and returns JSON response.
    case "sonarr_get_calendar": {
      if (!clients.sonarr) throw new Error("Sonarr not configured");
      const days = (args as { days?: number })?.days || 7;
      const start = new Date().toISOString().split('T')[0];
      const end = new Date(Date.now() + days * 24 * 60 * 60 * 1000).toISOString().split('T')[0];
      const calendar = await clients.sonarr.getCalendar(start, end);
      return {
        content: [{ type: "text", text: JSON.stringify(calendar, null, 2) }],
      };
    }
  • src/index.ts:216-228 (registration)
    Registration of sonarr_get_calendar tool in TOOLS array (conditional on Sonarr client configured), including input schema defining optional 'days' parameter.
      name: "sonarr_get_calendar",
      description: "Get upcoming TV episodes from Sonarr",
      inputSchema: {
        type: "object" as const,
        properties: {
          days: {
            type: "number",
            description: "Number of days to look ahead (default: 7)",
          },
        },
        required: [],
      },
    },
  • Core implementation in ArrClient.getCalendar (inherited by SonarrClient): constructs /api/v3/calendar?start=YYYY-MM-DD&end=YYYY-MM-DD query and makes authenticated API request to Sonarr.
    async getCalendar(start?: string, end?: string): Promise<unknown[]> {
      const params = new URLSearchParams();
      if (start) params.append('start', start);
      if (end) params.append('end', end);
      const query = params.toString() ? `?${params.toString()}` : '';
      return this.request<unknown[]>(`/calendar${query}`);
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states the action ('Get') but doesn't disclose behavioral traits such as whether this is a read-only operation, if it requires authentication, rate limits, pagination, error handling, or what the output format looks like. This leaves significant gaps for an agent to understand how the tool behaves.

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 that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, making it easy to parse quickly, which earns a high score for conciseness.

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 lack of annotations and output schema, the description is incomplete for a tool that likely returns structured data (e.g., a list of episodes). It doesn't explain return values, error cases, or behavioral context, which is insufficient for an agent to use it effectively without additional information.

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 the 'days' parameter clearly documented as 'Number of days to look ahead (default: 7)'. The description doesn't add any meaning beyond this, so it meets the baseline score of 3, as the schema adequately handles parameter semantics without extra value from the description.

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 verb ('Get') and resource ('upcoming TV episodes from Sonarr'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'sonarr_get_episodes' or 'sonarr_search_episode', which might also retrieve episode information, so it doesn't achieve the highest score for sibling distinction.

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 provides no guidance on when to use this tool versus alternatives. With many sibling tools like 'sonarr_get_episodes' and 'sonarr_search_episode' that might overlap in functionality, there's no indication of context, prerequisites, or exclusions to help an agent choose appropriately.

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