Skip to main content
Glama

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
NameRequiredDescriptionDefault
artistIdYesArtist ID to get albums for

Implementation Reference

  • Core implementation of fetching albums for a given artistId from Lidarr API endpoint /api/v1/album
    async getAlbums(artistId?: number): Promise<Album[]> { const url = artistId ? `/album?artistId=${artistId}` : '/album'; return this['request']<Album[]>(url); }
  • 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"], }, },
  • 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; }

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