lidarr_get_albums
Retrieve artist albums from Lidarr to identify available and missing music in your collection.
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 implementation of fetching albums for a given artistId from Lidarr API endpoint /api/v1/albumasync getAlbums(artistId?: number): Promise<Album[]> { const url = artistId ? `/album?artistId=${artistId}` : '/album'; return this['request']<Album[]>(url); }
- src/index.ts:1341-1364 (handler)MCP server tool handler for 'lidarr_get_albums' that validates configuration, calls LidarrClient.getAlbums, and formats response with album summaries.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:380-393 (registration)Registration of the 'lidarr_get_albums' tool in the MCP server TOOLS array, including description and input schema.{ 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 Album structure returned from Lidarr API and used in getAlbums response.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; }