lidarr_search_album
Initiate a search for an album by its ID to download music files.
Instructions
Trigger a search for a specific album to download
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| albumId | Yes | Album ID to search for |
Implementation Reference
- src/index.ts:579-591 (schema)Tool schema/registration for lidarr_search_album, defining input (albumId) and description
{ 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:1840-1854 (handler)Handler for lidarr_search_album tool call - validates Lidarr is configured, extracts albumId from args, calls LidarrClient.searchAlbum(), and returns 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/arr-client.ts:772-780 (helper)LidarrClient.searchAlbum() helper method - sends a POST to /command with AlbumSearch command to trigger a search for a specific album by ID
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:521-687 (registration)Registration of lidarr_search_album in the TOOLS array, conditional on lidarr client being configured
// Lidarr tools 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 by name. Returns results with foreignArtistId needed for lidarr_add_artist.", 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. Supports pagination with limit and offset.", inputSchema: { type: "object" as const, properties: { limit: { type: "number", description: "Maximum number of queue items to return (default: 25, max: 100)", }, offset: { type: "number", description: "Number of queue items to skip before returning results (default: 0)", }, }, 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: [], }, }, { name: "lidarr_add_artist", description: "Add an artist to Lidarr. Use lidarr_search first to find the foreignArtistId, and lidarr_get_root_folders / lidarr_get_quality_profiles / lidarr_get_metadata_profiles to get valid values. Use lidarr_get_tags to get valid tag IDs.", inputSchema: { type: "object" as const, properties: { foreignArtistId: { type: "string", description: "Foreign artist ID (MusicBrainz ID) from lidarr_search results", }, artistName: { type: "string", description: "Artist name", }, qualityProfileId: { type: "number", description: "Quality profile ID from lidarr_get_quality_profiles", }, metadataProfileId: { type: "number", description: "Metadata profile ID from lidarr_get_metadata_profiles", }, rootFolderPath: { type: "string", description: "Root folder path from lidarr_get_root_folders", }, monitored: { type: "boolean", description: "Whether to monitor the artist (default: true)", }, tags: { type: "array", items: { type: "number" }, description: "Array of tag IDs from lidarr_get_tags (optional)", }, }, required: ["foreignArtistId", "artistName", "qualityProfileId", "metadataProfileId", "rootFolderPath"], }, }, { name: "lidarr_get_root_folders", description: "Get available root folders for Lidarr. Use this to find valid rootFolderPath values when adding an artist.", inputSchema: { type: "object" as const, properties: {}, required: [], }, }, { name: "lidarr_get_quality_profiles", description: "Get available quality profiles for Lidarr. Use this to find valid qualityProfileId values when adding an artist.", inputSchema: { type: "object" as const, properties: {}, required: [], }, }, { name: "lidarr_get_metadata_profiles", description: "Get available metadata profiles for Lidarr. Use this to find valid metadataProfileId values when adding an artist.", inputSchema: { type: "object" as const, properties: {}, required: [], }, } );