Skip to main content
Glama

sonarr_get_calendar

Retrieve upcoming TV episodes from Sonarr for your monitored series. Specify a number of days ahead to see scheduled releases.

Instructions

Get upcoming TV episodes from Sonarr

Input Schema

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

Implementation Reference

  • Input schema and tool definition for sonarr_get_calendar. Defines the tool with a 'days' parameter (default: 7) to look ahead for upcoming TV episodes.
      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: [],
      },
    },
  • src/index.ts:1136-1137 (registration)
    The tool is registered via the CallToolRequestSchema handler switch-case. The case 'sonarr_get_calendar' is matched at line 1510.
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      const { name, arguments: args } = request.params;
  • Handler implementation for sonarr_get_calendar. Computes start/end dates (default 7 days ahead), calls clients.sonarr.getCalendar(start, end), and returns the JSON result.
    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) }],
      };
    }
  • Base ArrClient.getCalendar method used by SonarrClient (inherited from ArrClient). Calls GET /api/v3/calendar with optional start/end query params.
    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 present, and the description is too brief to disclose behavioral traits. It does not mention that this is a read-only operation, potential rate limits, or any side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise, using only 6 words to convey the core purpose. No redundant information, but it could be slightly expanded for clarity without losing conciseness.

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?

For a simple tool with one optional parameter and no output schema, the description provides minimal but sufficient information. It lacks details like the default behavior or format of the output, but the schema compensates partially.

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?

Schema description coverage is 100%, and the parameter is well-documented in the schema. The description adds no further meaning beyond what the schema provides, so baseline score of 3 is appropriate.

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?

Description clearly states it gets upcoming TV episodes from Sonarr. The name and parameter distinguish it from related tools like sonarr_get_episodes, but the description does not explicitly differentiate.

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 on when to use this tool versus alternatives like sonarr_get_episodes or sonarr_search_episode. The description only states what it does, not context for selection.

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