Skip to main content
Glama

delete_image

Remove an image from the BookStack gallery by specifying its unique ID to manage and clean up visual content within your wiki instance.

Instructions

Delete an image from the gallery

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesImage ID

Implementation Reference

  • Handler logic for the 'delete_image' tool: parses the image ID from arguments, calls the BookStack client's deleteImage method, and returns a success message.
    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 object with a required 'id' property of type number is expected.
    { name: "delete_image", description: "Delete an image from the gallery", inputSchema: { type: "object", properties: { id: { type: "number", description: "Image ID" }, }, required: ["id"], }, },
  • src/index.ts:56-59 (registration)
    Registration of the 'delete_image' tool (via createSearchAndUserTools) in the complete list of tools returned by the MCP server's listTools handler.
    const allTools: Tool[] = [ ...createContentTools(bookStackClient), ...createSearchAndUserTools(bookStackClient), ];
  • src/index.ts:124-128 (registration)
    Dispatch logic in the MCP callTool handler that routes 'delete_image' calls (listed 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); } else {
  • BookStackClient helper method that executes the actual DELETE API request to remove the image from the gallery.
    async deleteImage(id: number): Promise<void> { return this.delete(`/image-gallery/${id}`); }

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