Skip to main content
Glama

delete_chapter

Remove a chapter from BookStack by moving it to the recycle bin using its ID.

Instructions

Delete a chapter (moves to recycle bin)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesChapter ID

Implementation Reference

  • The handler logic for the 'delete_chapter' tool within the handleContentTool switch statement. It parses the chapter ID from arguments and calls BookStackClient.deleteChapter(id), returning a success message.
    case "delete_chapter": {
      const id = parseInteger(args.id);
      await client.deleteChapter(id);
      return `Chapter ${id} deleted successfully`;
    }
  • Tool definition providing the schema for 'delete_chapter', including input validation requiring a numeric chapter ID.
    {
      name: "delete_chapter",
      description: "Delete a chapter (moves to recycle bin)",
      inputSchema: {
        type: "object",
        properties: {
          id: { type: "number", description: "Chapter ID" },
        },
        required: ["id"],
      },
    },
  • src/index.ts:62-66 (registration)
    MCP server ListToolsRequest handler returns allTools, which includes the 'delete_chapter' tool schema from createContentTools.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: allTools,
      };
    });
  • src/index.ts:124-128 (registration)
    MCP server CallToolRequest handler dispatches 'delete_chapter' calls to handleContentTool based on inclusion in contentToolNames.
    if (contentToolNames.includes(name)) {
      result = await handleContentTool(name, args, bookStackClient);
    } else if (searchUserToolNames.includes(name)) {
      result = await handleSearchAndUserTool(name, args, bookStackClient);
    } else {
  • BookStackClient.deleteChapter method implements the core API deletion by calling DELETE /chapters/{id}.
    async deleteChapter(id: number): Promise<void> {
      return this.delete(`/chapters/${id}`);
    }
Behavior3/5

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

With no annotations provided, the description carries full burden. It discloses the key behavioral trait that deletion 'moves to recycle bin' rather than permanent removal, which is valuable context beyond just 'delete'. However, it doesn't mention permissions needed, whether deletion can be undone, error conditions, or what the response looks like.

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 - a single sentence with no wasted words. It's front-loaded with the core action and includes important behavioral context in parentheses. Every element earns its place.

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 destructive operation with no annotations and no output schema, the description provides minimal but critical context about the recycle bin behavior. However, it lacks important details about permissions, error handling, confirmation requirements, or what happens to dependent resources. The completeness is adequate but has clear gaps for a mutation tool.

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% with the single parameter 'id' documented as 'Chapter ID'. The description adds no additional parameter semantics beyond what the schema already provides. The baseline score of 3 is appropriate when the schema does the heavy lifting.

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 verb 'Delete' and the resource 'chapter', making the purpose unambiguous. It distinguishes from other delete operations by specifying it's for chapters, but doesn't differentiate from other chapter operations like update_chapter or export_chapter beyond the obvious verb difference.

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., needing the chapter ID), when deletion is appropriate versus archiving, or what happens if the chapter doesn't exist. No sibling tool comparisons are provided.

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