Skip to main content
Glama

Edit image

edit_image

Edit an uploaded image: rotate, flip, crop (pixels or aspect ratio), resize (width/height, percent, megapixels), grayscale (black & white), sepia, brightness, contrast, warm, cool, invert, blur, sharpen — applied in order. Optionally change the format (jpeg/png/webp) or make the file at most max_kb kilobytes (1 KB = 1,000 bytes). Creates a NEW image with its own page_url, image_url and download_url; the original stays unchanged.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "id": "<id>"
    },
    "name": "edit_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesImage id returned by upload_image or edit_image (e.g. "vqSvesFU")
formatNoOutput format: jpeg, png or webp. If omitted, the new image keeps the original format (a GIF becomes png). jpeg has no transparency: transparent areas turn white.
max_kbNoLargest file size in KB, 1 KB = 1,000 bytes (jpeg/webp)
qualityNoJPEG/WebP quality, 1–100 (default 90). png ignores it (lossless). With max_kb, the highest quality tried.
filenameNoOptional file name for the new image, e.g. "beach-small.jpg". Its extension is set to match the output format. If omitted: the original name + "-edited".
operationsNoExample: [{"op":"rotate","degrees":90},{"op":"resize","width":1080},{"op":"grayscale"}]
return_previewNoAlso return a small preview of the image so you can look at it (default false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / filename / description
      Added value: +"Optional file name for the new image, e.g. \"beach-small.jpg\". Its extension is set to match the output format. If omitted: the original name + \"-edited\"."
    • addedInput schema / properties / format / description
      Added value: +"Output format: jpeg, png or webp. If omitted, the new image keeps the original format (a GIF becomes png). jpeg has no transparency: transparent areas turn white."
    • addedInput schema / properties / quality / description
      Added value: +"JPEG/WebP quality, 1–100 (default 90). png ignores it (lossless). With max_kb, the highest quality tried."
  2. Changed1 schema field changed
    • changedInput schema / properties / max_kb / description
      Previous value: -"Largest file size in KB (jpeg/webp)"New value: +"Largest file size in KB, 1 KB = 1,000 bytes (jpeg/webp)"
  3. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only say readOnly=false and destructiveHint=false; the description goes further by disclosing that the result is a brand-new image with its own page_url/image_url/download_url and that the original is untouched. It also adds non-obvious rules: operations are applied in order, a GIF without an explicit format becomes png, jpeg drops transparency to white, and max_kb is only honored for jpeg/webp.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the verb and outcome, then constraints, then return semantics in three sentences with no filler. The long operation list partially repeats the enum in the schema, which is the only redundancy.

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

Completeness5/5

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

With no output schema, the description compensates by naming the returned URLs and the fact that a new resource is created rather than the original mutated. Combined with full schema coverage, nothing an agent needs to call this correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents every parameter; the description's addition is mainly the sequencing semantics of the operations array ("applied in order"), which the schema does not state. The KB definition (1 KB = 1,000 bytes) duplicates the schema, which limits the added value.

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

Purpose5/5

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

Opens with a specific verb and resource ("Edit an uploaded image") and enumerates the exact operation set, so an agent can distinguish it from upload_image, get_image and delete_image without opening the schema. It also states the outcome (a new image), which is not inferable from the name.

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

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Establishes the precondition (an already-uploaded image referenced by id) and implies editing rather than creating or fetching. There is no explicit "use upload_image instead when..." routing, but the input requirement of an existing id makes the boundary clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources