Skip to main content
Glama

delete_shelf

Remove a shelf from BookStack by moving it to the recycle bin using its ID. This action helps manage content organization by eliminating unused or outdated shelves.

Instructions

Delete a shelf (moves to recycle bin)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesShelf ID

Implementation Reference

  • Handler logic for the 'delete_shelf' tool within the handleContentTool switch statement. It parses the shelf ID from arguments, calls the BookStackClient.deleteShelf method, and returns a success message.
    case "delete_shelf": { const id = parseInteger(args.id); await client.deleteShelf(id); return `Shelf ${id} deleted successfully`; }
  • Tool registration/definition for 'delete_shelf' returned by createContentTools function. Includes name, description, and input schema requiring a numeric shelf ID.
    { name: "delete_shelf", description: "Delete a shelf (moves to recycle bin)", inputSchema: { type: "object", properties: { id: { type: "number", description: "Shelf ID" }, }, required: ["id"], }, },
  • Supporting helper method in BookStackClient class that performs the actual HTTP DELETE request to the BookStack API endpoint `/shelves/${id}` to delete the shelf.
    async deleteShelf(id: number): Promise<void> { return this.delete(`/shelves/${id}`); }
  • src/index.ts:76-100 (registration)
    MCP server dispatch registration: 'delete_shelf' is listed in contentToolNames array, routing calls to handleContentTool in the CallToolRequestSchema handler.
    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", ];

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