Skip to main content
Glama

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
NameRequiredDescriptionDefault
authorIdYesAuthor ID to search missing books for

Implementation Reference

  • 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"],
      },
    },
  • 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),
        }],
      };
    }
  • 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"],
      },
    },

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