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.

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 the handleContentTool switch statement. Parses the book ID from arguments, calls the BookStackClient's deleteBook method, and returns a success message.
    case "delete_book": {
      const id = parseInteger(args.id);
      await client.deleteBook(id);
      return `Book ${id} deleted successfully`;
    }
  • Input schema definition for the 'delete_book' tool, specifying that a numeric 'id' parameter is required.
    {
      name: "delete_book",
      description: "Delete a book (moves to recycle bin)",
      inputSchema: {
        type: "object",
        properties: {
          id: { type: "number", description: "Book ID" },
        },
        required: ["id"],
      },
    },
  • Supporting helper method in BookStackClient that sends a DELETE request to the BookStack API endpoint `/books/{id}` to delete the book.
    async deleteBook(id: number): Promise<void> {
      return this.delete(`/books/${id}`);
    }
  • src/index.ts:124-126 (registration)
    Registration and dispatch logic in the main CallToolRequestSchema handler. Checks if the tool name is in contentToolNames (which includes 'delete_book') and routes to handleContentTool.
    if (contentToolNames.includes(name)) {
      result = await handleContentTool(name, args, bookStackClient);
    } else if (searchUserToolNames.includes(name)) {
  • src/index.ts:81-81 (registration)
    'delete_book' listed in the contentToolNames array used for routing tool calls to the content tools handler.
    "delete_book",
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It adds valuable context by specifying that deletion 'moves to recycle bin', indicating the action is reversible rather than permanent, which is crucial for understanding the tool's effect beyond the basic 'delete' verb.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise and front-loaded, consisting of a single sentence that directly states the tool's purpose and key behavioral detail ('moves to recycle bin'). Every word earns its place with no wasted information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a deletion tool with no annotations and no output schema, the description is minimally adequate. It clarifies the reversible nature of deletion but lacks details on permissions, error conditions, or what happens post-deletion. Given the complexity and missing structured data, it could be more complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, with the single parameter 'id' documented as 'Book ID'. The description does not add any meaning beyond this, such as format or sourcing details, but the schema adequately covers the parameter, meeting the baseline for high coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Delete') and resource ('a book'), distinguishing it from sibling tools like 'delete_chapter' or 'delete_user' by specifying the exact entity being deleted. It provides immediate understanding of what the tool does without ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description offers no guidance on when to use this tool versus alternatives like 'update_book' or 'list_books', nor does it mention prerequisites such as needing the book ID. It lacks explicit context for selection among deletion tools or other operations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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