delete_shelf
Remove a shelf from the BookStack wiki by moving it to the recycle bin using its unique ID.
Instructions
Delete a shelf (moves to recycle bin)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Shelf ID |
Implementation Reference
- src/tools/content-tools.ts:767-771 (handler)The handler logic for the 'delete_shelf' tool within the handleContentTool function. It parses the shelf ID from arguments, calls the BookStackClient's deleteShelf method, and returns a success message.case "delete_shelf": { const id = parseInteger(args.id); await client.deleteShelf(id); return `Shelf ${id} deleted successfully`; }
- src/tools/content-tools.ts:528-534 (schema)The input schema definition for the 'delete_shelf' tool, specifying that a numeric 'id' parameter is required.inputSchema: { type: "object", properties: { id: { type: "number", description: "Shelf ID" }, }, required: ["id"], },
- src/tools/content-tools.ts:525-536 (registration)The tool registration object for 'delete_shelf' returned by createContentTools, including name, description, and input schema.{ name: "delete_shelf", description: "Delete a shelf (moves to recycle bin)", inputSchema: { type: "object", properties: { id: { type: "number", description: "Shelf ID" }, }, required: ["id"], }, }, ];
- src/lib/bookstack-client.ts:278-280 (helper)The helper method in BookStackClient that performs the actual API DELETE request to remove a shelf.async deleteShelf(id: number): Promise<void> { return this.delete(`/shelves/${id}`); }
- src/index.ts:97-100 (registration)'delete_shelf' is listed in the contentToolNames array used by the MCP server dispatcher to route calls to handleContentTool."create_shelf", "update_shelf", "delete_shelf", ];