Skip to main content
Glama

readarr_search_book

Search for and download specific books by their ID numbers using the Readarr media management service.

Instructions

Trigger a search for a specific book to download

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bookIdsYesBook ID(s) to search for

Implementation Reference

  • Core handler function in ReadarrClient that executes the BookSearch command by POSTing to /command endpoint with bookIds.
    async searchBook(bookIds: number[]): Promise<{ id: number }> {
      return this['request']<{ id: number }>('/command', {
        method: 'POST',
        body: JSON.stringify({
          name: 'BookSearch',
          bookIds,
        }),
      });
    }
  • MCP server tool call handler that checks Readarr configuration, extracts bookIds from arguments, calls searchBook, and formats success response.
    case "readarr_search_book": {
      if (!clients.readarr) throw new Error("Readarr not configured");
      const bookIds = (args as { bookIds: number[] }).bookIds;
      const result = await clients.readarr.searchBook(bookIds);
      return {
        content: [{
          type: "text",
          text: JSON.stringify({
            success: true,
            message: `Search triggered for ${bookIds.length} book(s)`,
            commandId: result.id,
          }, null, 2),
        }],
      };
    }
  • Tool schema definition specifying input as array of bookIds (numbers), and registration in TOOLS array conditional on Readarr client configuration.
    {
      name: "readarr_search_book",
      description: "Trigger a search for a specific book to download",
      inputSchema: {
        type: "object" as const,
        properties: {
          bookIds: {
            type: "array",
            items: { type: "number" },
            description: "Book ID(s) to search for",
          },
        },
        required: ["bookIds"],
      },
    },
  • src/index.ts:440-531 (registration)
    Conditional registration of all Readarr tools including readarr_search_book into the MCP TOOLS array when Readarr client is configured.
    if (clients.readarr) {
      TOOLS.push(
        {
          name: "readarr_get_authors",
          description: "Get all authors in Readarr library",
          inputSchema: {
            type: "object" as const,
            properties: {},
            required: [],
          },
        },
        {
          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"],
          },
        },
        {
          name: "readarr_get_queue",
          description: "Get Readarr download queue",
          inputSchema: {
            type: "object" as const,
            properties: {},
            required: [],
          },
        },
        {
          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"],
          },
        },
        {
          name: "readarr_search_book",
          description: "Trigger a search for a specific book to download",
          inputSchema: {
            type: "object" as const,
            properties: {
              bookIds: {
                type: "array",
                items: { type: "number" },
                description: "Book ID(s) to search for",
              },
            },
            required: ["bookIds"],
          },
        },
        {
          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"],
          },
        },
        {
          name: "readarr_get_calendar",
          description: "Get upcoming book releases from Readarr",
          inputSchema: {
            type: "object" as const,
            properties: {
              days: {
                type: "number",
                description: "Number of days to look ahead (default: 30)",
              },
            },
            required: [],
          },
        }
      );
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool triggers a search to download, implying a write/mutation operation, but lacks details on permissions, rate limits, whether it's asynchronous, what happens after triggering, or error handling. This is inadequate for a tool that likely modifies system state.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words. It's front-loaded with the core action and purpose, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool that triggers searches (likely a mutation with system impact), the description is incomplete. With no annotations and no output schema, it fails to address behavioral aspects like side effects, response format, or error conditions. The context signals show a simple parameter structure, but the description doesn't compensate for the lack of structured safety or output information.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with 'bookIds' clearly documented. The description adds minimal value beyond the schema by implying the search is for 'specific' books, but doesn't explain parameter usage, format expectations, or constraints beyond what's in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Trigger a search for a specific book to download.' It specifies the verb ('search') and resource ('book'), but doesn't differentiate from sibling tools like 'readarr_search' or 'readarr_search_missing' beyond implying it's for specific books via IDs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'readarr_search' or 'readarr_search_missing', nor does it specify prerequisites, exclusions, or appropriate contexts for triggering a search.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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