get_shelf
Retrieve details for a specific BookStack shelf, including all books within it, by providing the shelf ID.
Instructions
Get details of a specific book shelf including all books
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Shelf ID |
Implementation Reference
- src/bookstack-client.ts:662-665 (handler)The actual implementation of the getShelf client method.
async getShelf(id: number): Promise<any> { const response = await this.client.get(`/shelves/${id}`); return this.enhanceShelfResponse(response.data); } - src/index.ts:386-401 (registration)Registration of the "get_shelf" tool and the handler logic that calls the client.
server.registerTool( "get_shelf", { title: "Get Shelf Details", description: "Get details of a specific book shelf including all books", inputSchema: { id: z.coerce.number().min(1).describe("Shelf ID") } }, async (args) => { const shelf = await client.getShelf(args.id); return { content: [{ type: "text", text: JSON.stringify(shelf, null, 2) }] }; } );