Skip to main content
Glama

delete_book

Remove a book from the BookStack wiki by moving it to the recycle bin using its unique ID number.

Instructions

Delete a book (moves to recycle bin)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesBook ID

Implementation Reference

  • Handler logic for the 'delete_book' tool within handleContentTool switch statement. Parses the book ID from arguments and delegates to BookStackClient.deleteBook.
    case "delete_book": { const id = parseInteger(args.id); await client.deleteBook(id); return `Book ${id} deleted successfully`; }
  • Tool schema definition for 'delete_book' including name, description, and input schema requiring a numeric book ID.
    { name: "delete_book", description: "Delete a book (moves to recycle bin)", inputSchema: { type: "object", properties: { id: { type: "number", description: "Book ID" }, }, required: ["id"], }, },
  • BookStackClient helper method that performs the actual DELETE API request to /books/{id}.
    async deleteBook(id: number): Promise<void> { return this.delete(`/books/${id}`); }
  • src/index.ts:56-59 (registration)
    Registration of content tools (including delete_book schema) into the allTools array used for ListTools response.
    const allTools: Tool[] = [ ...createContentTools(bookStackClient), ...createSearchAndUserTools(bookStackClient), ];
  • src/index.ts:124-126 (registration)
    Dispatch registration in CallTool handler: routes 'delete_book' to handleContentTool based on contentToolNames inclusion.
    if (contentToolNames.includes(name)) { result = await handleContentTool(name, args, bookStackClient); } else if (searchUserToolNames.includes(name)) {

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