Skip to main content
Glama

delete_image

Remove images from the BookStack gallery by specifying the image ID to manage visual content and maintain organized documentation.

Instructions

Delete an image from the gallery

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesImage ID

Implementation Reference

  • The main handler for the delete_image tool, which parses the image ID from arguments and delegates to the BookStack client's deleteImage method.
    case "delete_image": {
      const id = parseInteger(args.id);
      await client.deleteImage(id);
      return `Image ${id} deleted successfully`;
    }
  • Input schema definition for the delete_image tool, specifying that an image ID (number) is required.
    {
      name: "delete_image",
      description: "Delete an image from the gallery",
      inputSchema: {
        type: "object",
        properties: {
          id: { type: "number", description: "Image ID" },
        },
        required: ["id"],
      },
    },
  • The delete_image tool is registered here as part of the search and user tools array returned by createSearchAndUserTools.
      {
        name: "delete_image",
        description: "Delete an image from the gallery",
        inputSchema: {
          type: "object",
          properties: {
            id: { type: "number", description: "Image ID" },
          },
          required: ["id"],
        },
      },
    ];
  • Helper method in BookStackClient that performs the actual API DELETE request to remove the image from the gallery.
    async deleteImage(id: number): Promise<void> {
      return this.delete(`/image-gallery/${id}`);
    }
  • src/index.ts:124-127 (registration)
    Tool dispatch registration in the main server handler, routing delete_image calls (included in searchUserToolNames) to handleSearchAndUserTool.
    if (contentToolNames.includes(name)) {
      result = await handleContentTool(name, args, bookStackClient);
    } else if (searchUserToolNames.includes(name)) {
      result = await handleSearchAndUserTool(name, args, bookStackClient);
Behavior2/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 of behavioral disclosure. It states 'Delete' which implies a destructive mutation, but doesn't clarify if this is permanent, reversible, requires specific permissions, or has side effects (e.g., affecting related data). This is a significant gap for a mutation tool with zero annotation coverage.

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, clear sentence with no wasted words, making it highly concise and front-loaded. It directly communicates the core action without unnecessary elaboration, earning full marks for efficiency.

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

Completeness2/5

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

Given the tool's destructive nature (implied by 'Delete'), no annotations, and no output schema, the description is incomplete. It should address behavioral aspects like permanence, permissions, or error handling to adequately guide the agent, but it lacks such details, making it insufficient for safe and effective use.

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 'Image ID' in the schema. The description doesn't add any meaning beyond this, such as format examples or constraints, so it meets the baseline of 3 where the schema handles parameter documentation adequately.

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 ('an image from the gallery'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'delete_attachment', 'delete_book', etc., which follow the same pattern but target different resources, so it lacks sibling distinction.

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. For example, it doesn't mention if this is for permanent deletion, if there are prerequisites like having the image ID, or how it differs from other delete operations in the sibling list, leaving the agent without contextual usage cues.

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