Skip to main content
Glama

readarr_get_books

Retrieve book availability for an author in Readarr, showing which titles are present and which require acquisition to complete your collection.

Instructions

Get books for an author in Readarr. Shows which books are available and which are missing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
authorIdYesAuthor ID to get books for

Implementation Reference

  • src/index.ts:474-487 (registration)
    Registration of the 'readarr_get_books' tool including its name, description, and input schema (requires authorId). Added to TOOLS array if Readarr client is configured.
    { name: "readarr_get_books", description: "Get books for an author in Readarr. Shows which books are available and which are missing.", inputSchema: { type: "object" as const, properties: { authorId: { type: "number", description: "Author ID to get books for", }, }, required: ["authorId"], }, },
  • MCP tool handler for 'readarr_get_books': validates Readarr config, calls client.getBooks(authorId), maps response to summary fields (id, title, releaseDate, pageCount, monitored, hasFile, sizeOnDisk, grabbed), returns formatted JSON.
    case "readarr_get_books": { if (!clients.readarr) throw new Error("Readarr not configured"); const authorId = (args as { authorId: number }).authorId; const books = await clients.readarr.getBooks(authorId); return { content: [{ type: "text", text: JSON.stringify({ count: books.length, books: books.map(b => ({ id: b.id, title: b.title, releaseDate: b.releaseDate, pageCount: b.pageCount, monitored: b.monitored, hasFile: b.statistics ? b.statistics.bookFileCount > 0 : false, sizeOnDisk: formatBytes(b.statistics?.sizeOnDisk || 0), grabbed: b.grabbed, })), }, null, 2), }], }; }
  • Core implementation in ReadarrClient.getBooks(): Performs GET request to /api/v1/book?authorId={authorId} via base request() method, returning array of Book objects.
    async getBooks(authorId?: number): Promise<Book[]> { const url = authorId ? `/book?authorId=${authorId}` : '/book'; return this['request']<Book[]>(url); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aplaceforallmystuff/mcp-arr'

If you have feedback or need assistance with the MCP directory API, please join our Discord server