lidarr_search_album
Search for a specific music album to download using its unique album 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/index.ts:1366-1380 (handler)Main handler for the lidarr_search_album tool. Checks Lidarr client configuration, parses albumId from input arguments, calls LidarrClient.searchAlbum, and returns a success response containing the command ID.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:395-407 (registration)Tool registration in the TOOLS array, including name, description, and input schema definition for lidarr_search_album. Conditionally added if Lidarr client is configured.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:395-407 (schema)Input schema definition for the lidarr_search_album tool, specifying albumId as a required number parameter.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/arr-client.ts:803-811 (helper)LidarrClient helper method searchAlbum that performs the actual API call to Lidarr's /command endpoint with 'AlbumSearch' payload containing the album ID, returning the command ID.async searchAlbum(albumId: number): Promise<{ id: number }> { return this['request']<{ id: number }>('/command', { method: 'POST', body: JSON.stringify({ name: 'AlbumSearch', albumIds: [albumId], }), }); }