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",
    ];
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses a key behavioral trait: deletion moves the shelf to a recycle bin rather than permanent removal, which is valuable context beyond just 'delete'. However, it doesn't cover other aspects like permissions needed, error conditions, or what happens to associated resources (e.g., books on the shelf).

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 a single, efficient sentence with zero waste. It's front-loaded with the core action and includes essential behavioral detail (moves to recycle bin) without fluff. Every word earns its place, making it highly concise and well-structured.

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?

Given the tool's complexity (a destructive operation with no annotations and no output schema), the description is minimally adequate. It covers the basic action and a key behavioral nuance (recycle bin), but lacks details on permissions, side effects, or error handling. For a delete tool, more context would be beneficial, but it meets the minimum viable threshold.

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?

Schema description coverage is 100% for the single parameter 'id', so the schema already documents it fully. The description adds no additional meaning about the parameter, such as format examples or constraints. Baseline is 3 when schema does the heavy lifting, but no extra value is provided.

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

Purpose4/5

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

The description clearly states the action ('Delete') and resource ('a shelf'), making the purpose unambiguous. It distinguishes from siblings like 'delete_book' or 'delete_user' by specifying the resource type. However, it doesn't explicitly differentiate from 'update_shelf' or 'get_shelf' beyond the verb, which prevents a perfect score.

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 provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., shelf must exist), exclusions (e.g., cannot delete if in use), or compare with siblings like 'delete_book' or 'update_shelf'. Usage is implied by the verb but lacks explicit context.

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