Skip to main content
Glama

update_image

Modify image details like name and metadata in BookStack wiki pages to maintain accurate visual content.

Instructions

Update image details

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesImage ID
nameNoImage name

Implementation Reference

  • MCP tool handler implementation for 'update_image'. Extracts id and name from args, parses id to integer, calls BookStackClient.updateImage, and returns formatted response.
    case "update_image": {
      const { id, name } = args;
      const imageId = parseInteger(id);
    
      const result = await client.updateImage(imageId, { name });
      return formatApiResponse(result);
    }
  • JSON Schema in tool definition specifying input parameters for 'update_image': required id (number), optional name (string).
    inputSchema: {
      type: "object",
      properties: {
        id: { type: "number", description: "Image ID" },
        name: { type: "string", description: "Image name" },
      },
      required: ["id"],
    },
  • src/index.ts:103-122 (registration)
    Registration of 'update_image' in the dispatch array for search/user tools in the main MCP server handler.
    const searchUserToolNames = [
      "search_all",
      "list_users",
      "get_user",
      "create_user",
      "update_user",
      "delete_user",
      "list_roles",
      "get_role",
      "create_role",
      "update_role",
      "delete_role",
      "list_attachments",
      "get_attachment",
      "delete_attachment",
      "list_images",
      "get_image",
      "update_image",
      "delete_image",
    ];
  • BookStackClient helper method implementing the API call to update an image via PUT or multipart POST to /image-gallery/{id}.
    async updateImage(
      id: number,
      data: { name?: string },
      imageFile?: Buffer,
      filename?: string
    ): Promise<ImageGallery> {
      if (imageFile && filename) {
        const formData = new FormData();
        if (data.name) formData.append("name", data.name);
        formData.append("image", imageFile, filename);
    
        return this.postMultipart<ImageGallery>(`/image-gallery/${id}`, formData);
      } else {
        return this.put<ImageGallery>(`/image-gallery/${id}`, data);
      }
    }
  • Zod schema for validating update_image parameters internally (optional name field).
    export const UpdateImageSchema = z.object({
      name: z.string().max(180).optional(),
    });
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. 'Update image details' implies a mutation operation but doesn't specify permissions required, whether changes are reversible, rate limits, or what happens to unspecified fields. For a mutation tool with zero annotation coverage, this minimal description fails to provide adequate behavioral context.

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 with a single three-word phrase. While under-specified, it's not verbose or poorly structured—every word earns its place by identifying the action and resource. No redundant or filler content is present.

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?

For a mutation tool with no annotations and no output schema, the description is incomplete. It doesn't explain what 'details' can be updated beyond the schema's name parameter, doesn't describe the return value or error conditions, and lacks context about the update operation's scope or effects. Given the complexity implied by sibling tools, this is inadequate.

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 both parameters (id and name) documented in the schema. The description adds no parameter-specific information beyond what the schema provides—it doesn't explain what 'image details' includes or constraints on the name field. Baseline score of 3 is appropriate since the schema handles parameter documentation adequately.

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

Purpose2/5

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

The description 'Update image details' is a tautology that restates the tool name 'update_image' without adding meaningful specificity. It mentions the resource ('image') but lacks a clear verb beyond 'update' and doesn't distinguish this tool from sibling update tools like update_book or update_user. No evidence of what 'details' encompasses or how this differs from other update operations.

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

Usage Guidelines1/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 an existing image ID), exclusions, or comparisons to siblings like delete_image or get_image. With multiple update tools in the sibling list, the absence of any contextual usage information is a significant gap.

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