Skip to main content
Glama

convert_image

Convert images between formats and apply edits such as resizing, compressing, rotating, blurring, sharpening, trimming, and metadata stripping using local input and output paths.

Instructions

Convert/process images. Input: jpg, jpeg, png, webp, gif, avif, tiff, bmp, svg, heic, heif, raw, jp2, jxl. Output: jpg, jpeg, png, webp, gif, avif, tiff, ico, jxl. Supports: resize, compress, rotate, flip, blur, sharpen, normalize, tint, trim, strip metadata, progressive, lossless.

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": {
      "inputPath": "<inputPath>",
      "outputPath": "<outputPath>"
    },
    "name": "convert_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
fitNoResize fit mode (optional)
blurNoBlur sigma e.g. 1.5 (optional)
flipNoFlip vertically (optional)
flopNoFlop horizontally (optional)
tintNoHex color tint e.g. '#ff0000' (optional)
trimNoTrim whitespace/borders (optional)
stripNoStrip EXIF metadata (optional)
widthNoResize width in pixels (optional)
heightNoResize height in pixels (optional)
rotateNoRotate degrees clockwise (optional)
densityNoDPI for SVG rasterization (optional, default 72)
qualityNoQuality 1-100 (optional, default 85)
sharpenNoApply sharpening (optional)
losslessNoLossless WebP/AVIF/JXL (optional)
grayscaleNoConvert to grayscale (optional)
inputPathYesAbsolute path to input image
normalizeNoStretch contrast to full range (optional)
backgroundNoBackground color e.g. '#ffffff' (optional)
outputPathYesAbsolute path for output image (include extension)
progressiveNoProgressive JPEG/PNG (optional)
generateIconsNoGenerate icon set 16-512px (optional)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral load. It usefully discloses a real behavioral constraint the schema does not: the input format set differs from the output format set (e.g., heic/heif/raw/jp2 are input-only; ico is output-only), which prevents failed calls. It says nothing about overwrite behavior on existing outputPath, error handling, or what happens when conflicting options (e.g., fit with width only) are combined.

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 purpose, then two compact enumerations. The long format lists are dense but they are the defining constraint of the tool, so they earn their place. Slight redundancy in listing both 'jpg' and 'jpeg' and in restating 'supports:' operations that partially duplicate the schema.

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 21-parameter, no-annotation, no-output-schema tool, the description covers formats and the main processing verbs but leaves the agent to discover fit modes, density (SVG rasterization at 72 DPI default), background/tint fill behavior, quality defaults, and the generateIcons icon-set side effect from the schema alone. It is adequate but noticeably short of complete for this complexity.

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 baseline is 3; the description earns a bump because its operation list groups the 21 parameters into recognizable capabilities (resize, compress, rotate, flip, blur, sharpen, normalize, tint, trim, strip metadata, progressive, lossless). It still omits several parameters entirely — fit, width/height, density, quality, background, grayscale, and generateIcons — so it does not fully map to what the agent sees.

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?

States a specific verb (convert/process) and resource (images), and the enumerated input/output format lists make it unmistakable that this is the image-only converter rather than the video, audio, or document siblings. It stops short of naming a sibling explicitly, so it is clear but not fully differentiated by direct contrast.

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

Usage Guidelines3/5

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

Usage is only implied: the format lists and operation list let an agent infer 'single image in, single image out,' but nothing says when to prefer batch_convert for multiple files, when to call get_supported_formats first, or when this tool is the wrong choice. No exclusions or prerequisites are stated.

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