Skip to main content
Glama

image_tools_convert

Convert an image to WebP, AVIF, JPEG or PNG, resize it and compress it. Strips EXIF by default, applies EXIF rotation, keeps animation for GIF/WebP sources. Returns the file with before/after sizes. Price: $0.01 USDC via x402, charged only on success. Part of Image tools: Everyday image work for sites and apps: convert and compress to WebP/AVIF/JPEG/PNG, responsive srcset sets with ready markup, colour palettes, pixel diffs for visual regression, SVG to PNG, QR codes, blur placeholders, and an inspection that says what to fix before shipping an image..

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

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

Input Schema

NameRequiredDescriptionDefault
fitNoinside: fit within the box, keep aspect; cover: fill the box and crop; contain: fit and pad with background.inside
imageNoImage file as base64 (PNG, JPEG, WebP, AVIF, GIF, TIFF or SVG).
widthNoTarget width in pixels. With only one of width/height the other follows the aspect ratio.
formatNoOutput format.webp
heightNo
qualityNoLossy quality. For PNG, under 100 switches to a palette PNG (much smaller).
upscaleNoAllow making the image larger than the source.
imageUrlNoLink to the image.
losslessNoWebP/AVIF lossless mode; PNG keeps full colour.
backgroundNoColour behind transparency. JPEG has no alpha, so it defaults to white there.
keepMetadataNoKeep EXIF/ICC. Off by default: strips location and camera data.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description does real work: it discloses that EXIF is stripped by default, EXIF rotation is applied, animation is preserved for GIF/WebP, and that output includes before/after sizes. It also states the billing model ($0.01 USDC via x402, charged only on success), which is important behavioral context. It stops short of file-size limits, auth requirements, and failure behavior, so it is not a 5.

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?

The core sentence is front-loaded and dense with useful facts, and the pricing clause is short. The appended catalog of unrelated image tools is boilerplate that dilutes focus, though it does aid sibling differentiation.

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 an 11-parameter tool it covers the return value (file plus before/after sizes) and billing, which is good given there is no output schema. However, with zero required parameters, the description never says that a source must be supplied via image or imageUrl, nor whether the two are mutually exclusive — a real gap for correct invocation.

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 coverage is 91%, so the schema already explains fit modes, quality, lossless, background, and keepMetadata. The description adds little parameter-level meaning beyond restating the output format set and noting animation preservation, which is a schema-baseline 3.

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?

The opening sentence names specific verbs and resources — convert to WebP/AVIF/JPEG/PNG, resize, compress — and the trailing catalog of sibling capabilities (srcset, palettes, diffs, SVG to PNG, QR, placeholders, inspection) makes clear which image work belongs elsewhere. An agent can route to this tool without opening any schema.

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 implied by the enumerated operations: format conversion, resizing, and compression. The sibling catalog indirectly delineates scope, but there is no explicit 'use X instead when' routing and no stated prerequisites for when a caller should pick this over image_tools_responsive or image_tools_svg_to_png.

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