lidarr_get_albums
Retrieve available and missing albums for a specific artist in Lidarr to manage music collection gaps.
Instructions
Get albums for an artist in Lidarr. Shows which albums are available and which are missing.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| artistId | Yes | Artist ID to get albums for |
Implementation Reference
- src/arr-client.ts:775-778 (handler)Core handler implementation in LidarrClient that performs the API request to Lidarr's /api/v1/album endpoint filtered by artistId to retrieve albums.async getAlbums(artistId?: number): Promise<Album[]> { const url = artistId ? `/album?artistId=${artistId}` : '/album'; return this['request']<Album[]>(url); }
- src/index.ts:1341-1364 (handler)MCP tool dispatch handler that validates Lidarr configuration, extracts artistId from arguments, calls LidarrClient.getAlbums, and formats the response as JSON text content.case "lidarr_get_albums": { if (!clients.lidarr) throw new Error("Lidarr not configured"); const artistId = (args as { artistId: number }).artistId; const albums = await clients.lidarr.getAlbums(artistId); return { content: [{ type: "text", text: JSON.stringify({ count: albums.length, albums: albums.map(a => ({ id: a.id, title: a.title, releaseDate: a.releaseDate, albumType: a.albumType, monitored: a.monitored, tracks: a.statistics ? `${a.statistics.trackFileCount}/${a.statistics.totalTrackCount}` : 'unknown', sizeOnDisk: formatBytes(a.statistics?.sizeOnDisk || 0), percentComplete: a.statistics?.percentOfTracks || 0, grabbed: a.grabbed, })), }, null, 2), }], }; }
- src/index.ts:381-393 (registration)Tool registration in the TOOLS array, including name, description, and input schema requiring artistId.name: "lidarr_get_albums", description: "Get albums for an artist in Lidarr. Shows which albums are available and which are missing.", inputSchema: { type: "object" as const, properties: { artistId: { type: "number", description: "Artist ID to get albums for", }, }, required: ["artistId"], }, },
- src/arr-client.ts:183-217 (schema)TypeScript interface defining the structure of Lidarr Album objects returned by the 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; }