Skip to main content
Glama

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

Implementation Reference

  • 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); }
  • 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"], }, },
  • 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; }

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