lidarr_search_album
Search for a specific music album to download using its ID within the Lidarr media management system.
Instructions
Trigger a search for a specific album to download
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| albumId | Yes | Album ID to search for |
Implementation Reference
- src/arr-client.ts:803-811 (handler)Core implementation of the lidarr_search_album tool in LidarrClient class. Executes POST to Lidarr API /command with 'AlbumSearch' and albumIds array containing the input albumId.async searchAlbum(albumId: number): Promise<{ id: number }> { return this['request']<{ id: number }>('/command', { method: 'POST', body: JSON.stringify({ name: 'AlbumSearch', albumIds: [albumId], }), }); }
- src/index.ts:395-407 (schema)Tool schema definition including name, description, and inputSchema requiring albumId (number). Part of the Lidarr tools array pushed to TOOLS.name: "lidarr_search_album", description: "Trigger a search for a specific album to download", inputSchema: { type: "object" as const, properties: { albumId: { type: "number", description: "Album ID to search for", }, }, required: ["albumId"], }, },
- src/index.ts:1366-1380 (handler)MCP tool call handler in the main switch statement. Validates Lidarr client, extracts albumId from args, calls LidarrClient.searchAlbum, and returns formatted success response with commandId.case "lidarr_search_album": { if (!clients.lidarr) throw new Error("Lidarr not configured"); const albumId = (args as { albumId: number }).albumId; const result = await clients.lidarr.searchAlbum(albumId); return { content: [{ type: "text", text: JSON.stringify({ success: true, message: `Search triggered for album`, commandId: result.id, }, null, 2), }], }; }
- src/index.ts:346-437 (registration)Conditional registration of Lidarr-specific tools (including lidarr_search_album) to the TOOLS array, only if Lidarr client is configured.if (clients.lidarr) { TOOLS.push( { name: "lidarr_get_artists", description: "Get all artists in Lidarr library", inputSchema: { type: "object" as const, properties: {}, required: [], }, }, { name: "lidarr_search", description: "Search for artists to add to Lidarr", inputSchema: { type: "object" as const, properties: { term: { type: "string", description: "Search term (artist name)", }, }, required: ["term"], }, }, { name: "lidarr_get_queue", description: "Get Lidarr download queue", inputSchema: { type: "object" as const, properties: {}, required: [], }, }, { 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"], }, }, { name: "lidarr_search_album", description: "Trigger a search for a specific album to download", inputSchema: { type: "object" as const, properties: { albumId: { type: "number", description: "Album ID to search for", }, }, required: ["albumId"], }, }, { name: "lidarr_search_missing", description: "Trigger a search for all missing albums for an artist", inputSchema: { type: "object" as const, properties: { artistId: { type: "number", description: "Artist ID to search missing albums for", }, }, required: ["artistId"], }, }, { 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: [], }, } ); }