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 {
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions searching across content types but lacks details on permissions, rate limits, pagination behavior (beyond what the schema covers), or what the search results include (e.g., relevance scoring, fields returned). For a search tool with no annotation coverage, this is a significant gap.

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 that front-loads the core purpose ('Search across all content types') without unnecessary words. Every part of the sentence contributes to understanding the tool's scope and target, making it appropriately sized and structured.

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

Completeness3/5

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

Given the tool's moderate complexity (search across multiple types) and no output schema, the description is minimally complete but lacks depth. It specifies what is searched but not how results are returned or behavioral aspects like permissions. With no annotations and incomplete behavioral transparency, it falls short of being fully helpful for an agent.

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?

Schema description coverage is 100%, so the schema already documents all parameters (query, page, count) with their types and descriptions. The description does not add any additional meaning beyond what the schema provides, such as search syntax or result formatting, meeting the baseline for high schema coverage.

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

Purpose5/5

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

The description clearly states the specific action ('Search across') and the target resources ('all content types (books, chapters, pages, shelves) in BookStack'), making the purpose explicit. It distinguishes this tool from sibling tools that are primarily CRUD operations on individual resource types, as this is a cross-content search function.

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

Usage Guidelines3/5

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

The description implies usage by specifying 'all content types,' suggesting it should be used for broad searches rather than targeted ones. However, it does not explicitly state when to use this tool versus alternatives (e.g., individual list_* tools for specific types) or provide exclusions, leaving some ambiguity in context.

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

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