Skip to main content
Glama

get_chapter

Retrieve details for a specific chapter from BookStack, including its pages, by providing the chapter ID.

Instructions

Get details of a specific chapter including its pages

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesChapter ID

Implementation Reference

  • Handler logic 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 schema definition including name, description, and input schema requiring a numeric 'id' for the chapter.
    { 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 of 'get_chapter' in the contentToolNames array, which routes tool calls to the appropriate handler function.
    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 chapter by ID.
    async getChapter(id: number): Promise<Chapter> { const response: AxiosResponse<Chapter> = await this.api.get( `/chapters/${id}` ); return response.data; }

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