Skip to main content
Glama
ttpears

BookStack MCP Server

by ttpears

Search BookStack Content

search_content

Search BookStack documentation content with contextual previews and location details using advanced query syntax.

Instructions

Search across BookStack content with contextual previews and location info

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query. Use BookStack advanced search syntax like {type:page} or {book_id:5}
typeNoFilter by content type
countNoNumber of results to return (max 500)
offsetNoNumber of results to skip for pagination

Implementation Reference

  • The actual implementation of the search_content tool, which calls the BookStack API with search parameters and processes the results.
    async searchContent(query: string, options?: {
      type?: 'book' | 'page' | 'chapter' | 'bookshelf';
      count?: number;
      offset?: number;
    }): Promise<any> {
      let searchQuery = query;
    
      // Use advanced search syntax for type filtering
      if (options?.type) {
        searchQuery = `{type:${options.type}} ${query}`.trim();
      }
    
      const params: any = { query: searchQuery };
      if (options?.count) params.count = Math.min(options.count, 500); // BookStack max
      if (options?.offset) params.offset = options.offset;
    
      const response = await this.client.get('/search', { params });
      const results = response.data.data || response.data;
    
      return await this.enhanceSearchResults(results, query);
  • src/index.ts:60-80 (registration)
    MCP tool registration for "search_content", defining the schema and the handler that calls the bookstack client.
    server.registerTool(
      "search_content",
      {
        title: "Search BookStack Content",
        description: "Search across BookStack content with contextual previews and location info",
        inputSchema: {
          query: z.string().describe("Search query. Use BookStack advanced search syntax like {type:page} or {book_id:5}"),
          type: z.enum(["book", "page", "chapter", "bookshelf"]).optional().describe("Filter by content type"),
          count: z.coerce.number().max(500).optional().describe("Number of results to return (max 500)"),
          offset: z.coerce.number().optional().describe("Number of results to skip for pagination")
        }
      },
      async (args) => {
        const results = await client.searchContent(args.query, {
          type: args.type,
          count: args.count,
          offset: args.offset
        });
        return {
          content: [{ type: "text", text: JSON.stringify(results, null, 2) }]
        };
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. While it mentions 'contextual previews and location info' as output characteristics, it doesn't address important behavioral aspects like authentication requirements, rate limits, error conditions, pagination behavior beyond the offset parameter, or what happens with empty results.

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 communicates the core functionality without unnecessary words. It's appropriately sized and front-loaded with the essential information.

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 search tool with 4 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what the search results look like (beyond mentioning 'previews and location info'), doesn't address search limitations or performance characteristics, and doesn't help differentiate from sibling tools.

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?

With 100% schema description coverage, the baseline is 3. The description doesn't add any parameter-specific information beyond what's already in the schema descriptions, so it doesn't enhance parameter understanding beyond the structured documentation.

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 as searching across BookStack content with contextual previews and location info, which is a specific verb+resource combination. However, it doesn't explicitly differentiate from its sibling 'search_pages' tool, which appears to be a more specific search variant.

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 like 'search_pages' or other get_* tools. There's no mention of prerequisites, limitations, or comparative use cases that would help an agent choose appropriately.

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/ttpears/bookstack-mcp'

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