Skip to main content
Glama

get_chapter

Retrieve chapter details and page contents from BookStack wiki using the chapter ID.

Instructions

Get details of a specific chapter including its pages

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesChapter ID

Implementation Reference

  • Handler function for the 'get_chapter' tool. Parses the input ID, fetches the chapter using the BookStack client, and formats the API response.
    case "get_chapter": {
      const id = parseInteger(args.id);
      const result = await client.getChapter(id);
      return formatApiResponse(result);
    }
  • Tool declaration including name, description, and input schema requiring a numeric chapter ID.
    {
      name: "get_chapter",
      description: "Get details of a specific chapter including its pages",
      inputSchema: {
        type: "object",
        properties: {
          id: { type: "number", description: "Chapter ID" },
        },
        required: ["id"],
      },
    },
  • src/index.ts:76-100 (registration)
    Registration in the contentToolNames array, which determines if the tool call is routed to handleContentTool.
    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",
    ];
  • Helper method in BookStackClient that performs the actual API call to retrieve a specific chapter by ID.
    async getChapter(id: number): Promise<Chapter> {
      const response: AxiosResponse<Chapter> = await this.api.get(
        `/chapters/${id}`
      );
      return response.data;
    }
  • src/index.ts:56-59 (registration)
    Tools from createContentTools (which includes 'get_chapter') are added to allTools for listing available tools.
    const allTools: Tool[] = [
      ...createContentTools(bookStackClient),
      ...createSearchAndUserTools(bookStackClient),
    ];
Behavior2/5

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

No annotations are provided, so the description carries full burden. It implies a read-only operation by using 'Get', but doesn't disclose behavioral traits like authentication needs, rate limits, error handling, or whether it's idempotent. For a tool with no annotation coverage, this is a significant gap in transparency.

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 without unnecessary details. It's appropriately sized for a simple retrieval tool, with zero wasted words.

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 output schema, no annotations), the description is minimally adequate. It states what the tool does but lacks completeness in usage guidance and behavioral context, making it functional but with clear gaps for an AI 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?

The input schema has 100% description coverage, with the 'id' parameter clearly documented. The description adds no additional meaning beyond what the schema provides, such as format examples or constraints. Baseline 3 is appropriate as the schema does the heavy lifting.

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 verb 'Get' and resource 'details of a specific chapter including its pages', which is specific and unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'get_book' or 'get_page', which also retrieve details of related resources, so it misses full sibling distinction.

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 such as 'list_chapters' for multiple chapters or 'get_book' for broader book details. It lacks explicit context, prerequisites, or exclusions, leaving usage unclear in the tool ecosystem.

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