Skip to main content
Glama

search_all

Search across books, chapters, pages, and shelves in BookStack to find specific content using a query string.

Instructions

Search across all content types (books, chapters, pages, shelves) in BookStack

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query string (required)
pageNoPage number for pagination
countNoNumber of items per page (default 20, max 500)

Implementation Reference

  • Handler implementation for the 'search_all' tool. Parses arguments, validates query, calls BookStackClient.search method, and formats the API response.
    case "search_all": { const { query, page, count } = args; if (!query || typeof query !== "string") { throw new Error("Search query is required and must be a string"); } const params = { query, page: page ? parseInteger(page) : undefined, count: count ? parseInteger(count) : undefined, }; const result = await client.search(query, { page: page ? parseInteger(page) : undefined, count: count ? parseInteger(count) : undefined, }); return formatApiResponse(result.data, result.total); }
  • Input schema definition for the 'search_all' tool, including properties for query (required), page, and count.
    { name: "search_all", description: "Search across all content types (books, chapters, pages, shelves) in BookStack", inputSchema: { type: "object", properties: { query: { type: "string", description: "Search query string (required)", }, page: { type: "number", description: "Page number for pagination", }, count: { type: "number", description: "Number of items per page (default 20, max 500)", }, }, required: ["query"], }, },
  • src/index.ts:56-59 (registration)
    Registration of the 'search_all' tool as part of the allTools array via createSearchAndUserTools, used in MCP server tool listing.
    const allTools: Tool[] = [ ...createContentTools(bookStackClient), ...createSearchAndUserTools(bookStackClient), ];
  • src/index.ts:62-66 (registration)
    MCP server request handler for listing tools, which includes 'search_all' from allTools.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: allTools, }; });
  • src/index.ts:124-128 (registration)
    Dispatch logic in CallToolRequestHandler that routes calls to 'search_all' to the handleSearchAndUserTool function.
    if (contentToolNames.includes(name)) { result = await handleContentTool(name, args, bookStackClient); } else if (searchUserToolNames.includes(name)) { result = await handleSearchAndUserTool(name, args, bookStackClient); } else {

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/lautarobarba/bookstack_mcp_server'

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