lidarr_get_calendar
Retrieve upcoming album releases from Lidarr for a specified number of days ahead. Plan your music library updates.
Instructions
Get upcoming album releases from Lidarr
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Number of days to look ahead (default: 30) |
Implementation Reference
- src/index.ts:607-620 (registration)Registration of the lidarr_get_calendar tool with its name, description, and input schema. Registered as part of the Lidarr tools section (lines 522-688).
{ 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: [], }, }, - src/index.ts:607-620 (schema)Input schema for lidarr_get_calendar: accepts an optional 'days' number (default 30).
{ 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: [], }, }, - src/index.ts:1872-1894 (handler)Handler for lidarr_get_calendar tool call. Calculates date range (default 30 days ahead), calls clients.lidarr.getCalendar(start, end), and returns formatted album data (id, title, artistId, releaseDate, albumType, monitored).
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/arr-client.ts:785-791 (helper)Helper method on LidarrClient (extends ArrClient) that makes the actual API call to /calendar endpoint with start/end date parameters. Returns typed Album[] data.
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}`); }