get_chapter
Retrieve specific chapter details from BookStack documentation using the chapter ID to access structured content information.
Instructions
Get details of a specific chapter
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Chapter ID |
Implementation Reference
- src/index.ts:216-230 (handler)Registration of the 'get_chapter' tool in index.ts.
"get_chapter", { title: "Get Chapter Details", description: "Get details of a specific chapter", inputSchema: { id: z.coerce.number().min(1).describe("Chapter ID") } }, async (args) => { const chapter = await client.getChapter(args.id); return { content: [{ type: "text", text: JSON.stringify(chapter, null, 2) }] }; } ); - src/bookstack-client.ts:399-402 (handler)The underlying 'getChapter' method in the BookStackClient class that handles the API call and enhances the response.
async getChapter(id: number): Promise<any> { const response = await this.client.get(`/chapters/${id}`); return await this.enhanceChapterResponse(response.data); }