Skip to main content
Glama

get_book

Retrieve detailed information and content structure for a specific book from a BookStack wiki instance using its unique ID.

Instructions

Get details of a specific book including its content structure

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesBook ID

Implementation Reference

  • The main handler logic for the 'get_book' tool within the handleContentTool switch statement. It parses the book ID from input arguments, calls the BookStackClient's getBook method, and returns a formatted API response.
    case "get_book": {
      const id = parseInteger(args.id);
      const result = await client.getBook(id);
      return formatApiResponse(result);
    }
  • Tool schema definition for 'get_book', specifying the name, description, and input schema requiring a numeric 'id' parameter. Part of the createContentTools array.
      name: "get_book",
      description:
        "Get details of a specific book including its content structure",
      inputSchema: {
        type: "object",
        properties: {
          id: { type: "number", description: "Book ID" },
        },
        required: ["id"],
      },
    },
  • src/index.ts:76-126 (registration)
    Registers 'get_book' by including it in the contentToolNames array and routing calls to handleContentTool in the MCP server's CallToolRequest handler.
    const contentToolNames = [
      "list_books",
      "get_book",
      "create_book",
      "update_book",
      "delete_book",
      "export_book",
      "list_chapters",
      "get_chapter",
      "create_chapter",
      "update_chapter",
      "delete_chapter",
      "export_chapter",
      "list_pages",
      "get_page",
      "create_page",
      "update_page",
      "delete_page",
      "export_page",
      "list_shelves",
      "get_shelf",
      "create_shelf",
      "update_shelf",
      "delete_shelf",
    ];
    
    // Search and user tools
    const searchUserToolNames = [
      "search_all",
      "list_users",
      "get_user",
      "create_user",
      "update_user",
      "delete_user",
      "list_roles",
      "get_role",
      "create_role",
      "update_role",
      "delete_role",
      "list_attachments",
      "get_attachment",
      "delete_attachment",
      "list_images",
      "get_image",
      "update_image",
      "delete_image",
    ];
    
    if (contentToolNames.includes(name)) {
      result = await handleContentTool(name, args, bookStackClient);
    } else if (searchUserToolNames.includes(name)) {
  • Helper method in BookStackClient that performs the actual API GET request to retrieve a book by ID from the BookStack server.
    async getBook(id: number): Promise<Book> {
      const response: AxiosResponse<Book> = await this.api.get(`/books/${id}`);
      return response.data;
    }
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 states the tool retrieves details but doesn't cover critical aspects like whether it's a read-only operation (implied by 'Get' but not explicit), error handling (e.g., for invalid IDs), authentication needs, rate limits, or response format. For a retrieval tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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: 'Get details of a specific book including its content structure.' It is front-loaded with the core purpose and avoids unnecessary words. Every part of the sentence contributes value by specifying what is retrieved and the scope.

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 low complexity (single parameter, no nested objects) and high schema coverage, the description is minimally adequate. However, with no annotations and no output schema, it lacks details on behavioral traits (e.g., safety, errors) and return values. The description covers the basic purpose but doesn't compensate for the missing structured data, making it incomplete for fully informed usage.

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 the 'id' parameter documented as 'Book ID.' The description adds no additional parameter semantics beyond what the schema provides (e.g., it doesn't explain ID format, sourcing, or constraints). According to the rules, with high schema coverage (>80%), the baseline score is 3 even without param info in the description.

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: 'Get details of a specific book including its content structure.' It specifies the verb ('Get'), resource ('book'), and scope ('details' and 'content structure'), distinguishing it from siblings like list_books (which lists multiple books) or get_chapter (which retrieves chapter-specific details). However, it doesn't explicitly differentiate from other get_* tools (e.g., get_chapter) beyond the resource type.

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 prerequisites (e.g., needing a book ID), contrast with list_books for browsing, or specify use cases like retrieving full book metadata. Without such context, the agent must infer usage from the tool name and schema alone.

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