readarr_search
Search for authors to add to your Readarr book management library by entering an author name.
Instructions
Search for authors to add to Readarr
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| term | Yes | Search term (author name) |
Implementation Reference
- src/index.ts:1444-1461 (handler)MCP tool handler for 'readarr_search': extracts search term, calls ReadarrClient.searchAuthors(), limits results to 10, formats as JSON response.case "readarr_search": { if (!clients.readarr) throw new Error("Readarr not configured"); const term = (args as { term: string }).term; const results = await clients.readarr.searchAuthors(term); return { content: [{ type: "text", text: JSON.stringify({ count: results.length, results: results.slice(0, 10).map(r => ({ title: r.title, foreignAuthorId: r.foreignAuthorId, overview: r.overview?.substring(0, 200) + (r.overview && r.overview.length > 200 ? '...' : ''), })), }, null, 2), }], }; }
- src/index.ts:451-463 (registration)Registers the 'readarr_search' tool in the MCP server TOOLS array, including name, description, and input schema requiring 'term' string.{ name: "readarr_search", description: "Search for authors to add to Readarr", inputSchema: { type: "object" as const, properties: { term: { type: "string", description: "Search term (author name)", }, }, required: ["term"], },
- src/index.ts:454-463 (schema)Defines the input schema for 'readarr_search' tool: object with required 'term' property of type string.inputSchema: { type: "object" as const, properties: { term: { type: "string", description: "Search term (author name)", }, }, required: ["term"], },
- src/arr-client.ts:855-857 (helper)ReadarrClient.searchAuthors method: implements the core logic by making an authenticated GET request to Readarr API endpoint '/author/lookup?term=<encoded-term>'.async searchAuthors(term: string): Promise<SearchResult[]> { return this['request']<SearchResult[]>(`/author/lookup?term=${encodeURIComponent(term)}`); }