readarr_search_missing
Search for missing books by author ID to complete your digital library collection in Readarr.
Instructions
Trigger a search for all missing books for an author
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| authorId | Yes | Author ID to search missing books for |
Implementation Reference
- src/arr-client.ts:893-901 (handler)The core handler function in ReadarrClient that executes the tool logic by sending a POST request to the Readarr /command endpoint with 'AuthorSearch' and the authorId parameter to trigger searching for missing books.async searchMissingBooks(authorId: number): Promise<{ id: number }> { return this['request']<{ id: number }>('/command', { method: 'POST', body: JSON.stringify({ name: 'AuthorSearch', authorId, }), }); }
- src/index.ts:504-516 (registration)Tool registration in the TOOLS array, including name, description, and input schema definition (requires authorId: number). Added conditionally if Readarr client is configured.name: "readarr_search_missing", description: "Trigger a search for all missing books for an author", inputSchema: { type: "object" as const, properties: { authorId: { type: "number", description: "Author ID to search missing books for", }, }, required: ["authorId"], }, },
- src/index.ts:1523-1537 (handler)The MCP server request handler case that processes calls to 'readarr_search_missing', validates Readarr configuration, extracts authorId from arguments, calls the client method, and formats the success response with command ID.case "readarr_search_missing": { if (!clients.readarr) throw new Error("Readarr not configured"); const authorId = (args as { authorId: number }).authorId; const result = await clients.readarr.searchMissingBooks(authorId); return { content: [{ type: "text", text: JSON.stringify({ success: true, message: `Search triggered for missing books`, commandId: result.id, }, null, 2), }], }; }
- src/index.ts:504-516 (schema)Input schema definition for the tool, specifying object with required 'authorId' property of type number.name: "readarr_search_missing", description: "Trigger a search for all missing books for an author", inputSchema: { type: "object" as const, properties: { authorId: { type: "number", description: "Author ID to search missing books for", }, }, required: ["authorId"], }, },