Skip to main content
Glama

lidarr_get_calendar

Retrieve upcoming album releases from Lidarr to plan music collection updates. Specify days ahead to view release schedules.

Instructions

Get upcoming album releases from Lidarr

Input Schema

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

Implementation Reference

  • Main handler for the lidarr_get_calendar tool. Checks if Lidarr client is configured, computes date range from input 'days' parameter (default 30), calls LidarrClient.getCalendar, formats response with album count and details.
    case "lidarr_get_calendar": { if (!clients.lidarr) throw new Error("Lidarr not configured"); const days = (args as { days?: number })?.days || 30; 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.lidarr.getCalendar(start, end); return { content: [{ type: "text", text: JSON.stringify({ count: calendar.length, albums: calendar.map(a => ({ id: a.id, title: a.title, artistId: a.artistId, releaseDate: a.releaseDate, albumType: a.albumType, monitored: a.monitored, })), }, null, 2), }], }; }
  • src/index.ts:423-436 (registration)
    Tool registration in TOOLS array (conditional on Lidarr client being configured). Defines the tool name, description, and input schema with optional 'days' parameter.
    name: "lidarr_get_calendar", description: "Get upcoming album releases from Lidarr", inputSchema: { type: "object" as const, properties: { days: { type: "number", description: "Number of days to look ahead (default: 30)", }, }, required: [], }, } );
  • LidarrClient.getCalendar method: Constructs Lidarr API calendar endpoint with optional start/end dates, calls the base request method to fetch upcoming album releases.
    async getCalendar(start?: string, end?: string): Promise<Album[]> { 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']<Album[]>(`/calendar${query}`); }
  • src/index.ts:76-78 (registration)
    Initialization of LidarrClient instance if LIDARR_URL and LIDARR_API_KEY env vars are set.
    case 'lidarr': clients.lidarr = new LidarrClient(config); break;
  • TypeScript interface defining the Album structure returned by Lidarr calendar API.
    export interface Album { id: number; title: string; disambiguation: string; overview: string; artistId: number; foreignAlbumId: string; monitored: boolean; anyReleaseOk: boolean; profileId: number; duration: number; albumType: string; genres: string[]; images: Array<{ coverType: string; url: string }>; links: Array<{ url: string; name: string }>; statistics?: { trackFileCount: number; trackCount: number; totalTrackCount: number; sizeOnDisk: number; percentOfTracks: number; }; releaseDate: string; releases: Array<{ id: number; albumId: number; foreignReleaseId: string; title: string; status: string; duration: number; trackCount: number; monitored: boolean; }>; grabbed: boolean; }

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