lidarr_search
Search for music artists to add to your Lidarr music management system. Enter an artist name to find and add them to your collection.
Instructions
Search for artists to add to Lidarr
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| term | Yes | Search term (artist name) |
Implementation Reference
- src/index.ts:1302-1319 (handler)MCP server tool handler for 'lidarr_search': validates Lidarr client, calls searchArtists(term), formats top 10 results with count and truncated overview.case "lidarr_search": { if (!clients.lidarr) throw new Error("Lidarr not configured"); const term = (args as { term: string }).term; const results = await clients.lidarr.searchArtists(term); return { content: [{ type: "text", text: JSON.stringify({ count: results.length, results: results.slice(0, 10).map(r => ({ title: r.title, foreignArtistId: r.foreignArtistId, overview: r.overview?.substring(0, 200) + (r.overview && r.overview.length > 200 ? '...' : ''), })), }, null, 2), }], }; }
- src/arr-client.ts:752-754 (handler)LidarrClient.searchArtists: Makes API GET request to /api/v1/artist/lookup?term={term} using base request method, returns SearchResult[].async searchArtists(term: string): Promise<SearchResult[]> { return this['request']<SearchResult[]>(`/artist/lookup?term=${encodeURIComponent(term)}`); }
- src/index.ts:357-370 (schema)Tool schema definition: name 'lidarr_search', requires 'term' string input for artist search.{ 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"], }, },
- src/index.ts:346-437 (registration)Conditional registration of Lidarr tools (including lidarr_search) to TOOLS array if Lidarr client 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: [], }, } ); }
- src/index.ts:76-78 (registration)Initializes LidarrClient instance from config if LIDARR_URL and LIDARR_API_KEY set.case 'lidarr': clients.lidarr = new LidarrClient(config); break;