Skip to main content
Glama

convert_image

Convert image format

Convert an image to a different format (jpeg, png, webp, tiff, gif, avif). Optionally set quality, strip metadata, enable lossless mode (webp, avif), or tune encoder effort (avif). Instead of a q number you can set quality_target (0-1]: the smallest file with SSIM at or above the target, searched on the worker (jpeg, webp, avif; flat surcharge; outcome reported in X-Pictomancer-Quality-* headers). Optional enhancement modifiers: denoise (1-3), equalize, sharpen (applied denoise -> equalize -> op -> sharpen).

Responses:

200: Processed image binary (Success Response) Content-Type: application/json Content-Type: image/jpeg

Example Response:

"string"

Content-Type: image/png

Example Response:

"string"

Content-Type: image/webp

Example Response:

"string"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qNoQuality (1-100). Maps to libvips Q parameter.
stripNoStrip metadata (EXIF, ICC profile, etc.) from the output.
effortNoAV1 encoder CPU effort (0-9). Higher = smaller file, slower. Only applies to avif.
formatYesTarget format: jpeg, png, webp, tiff, gif, or avif.
sourceYesImage source: a public URL (https://...) or a base64-encoded string (optionally as a data URI like data:image/png;base64,...).
autorotNoApply EXIF orientation before converting. Opt-in; default false, which preserves current byte-for-byte behavior.
denoiseNoMedian denoise before converting: radius 1-3 (window 3x3 to 7x7). Opt-in; no surcharge.
sharpenNoUnsharp-mask sharpen after converting (libvips defaults). Opt-in.
deliveryNo
equalizeNoAuto-contrast (histogram equalisation of the value channel; hue and saturation preserved) before converting. Opt-in.
losslessNoEnable lossless encoding. Only applies to webp and avif.
quality_targetNoTarget SSIM (0-1]: the worker searches for the smallest file that still scores at least this. Alternative to q; mutually exclusive with it and with lossless. Only for jpeg, webp, avif. Carries a flat surcharge for the extra encodes.

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It covers delivery methods (inline, put_url, callback), security details (credentials never stored, HMAC signatures), surcharges for quality_target, and the order of modifier application. However, it does not mention idempotency, rate limits, or whether the original source is modified.

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 description is well-structured, starting with a brief summary followed by detailed explanations of options and delivery modes. The inclusion of response headers and example outputs is helpful. While slightly lengthy, each sentence provides necessary context, and it avoids redundancy.

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

Completeness4/5

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

For a tool with 12 parameters, multiple delivery modes, and optional enhancement modifiers, the description covers most aspects comprehensively. It explains quality_target behavior, delivery authentication, and modifier order. Minor gaps include lack of explicit error response documentation, but the examples and schema cover the expected output.

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?

Despite 92% schema coverage, the description adds significant value beyond the structured schema. It explains the relationship between q and quality_target, the mutual exclusivity with lossless, the modifier pipeline order (denoise -> equalize -> op -> sharpen), and the meaning of the quality search headers. This helps the agent understand parameter interactions.

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 description clearly states 'Convert image format' and lists all supported formats (jpeg, png, webp, tiff, gif, avif). It distinguishes convert_image from sibling tools like compress_image, crop_image, resize_image, etc., by focusing on format conversion.

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?

The description explains what the tool does in detail but does not explicitly provide guidance on when to use this tool versus alternatives such as compress_image or optimize_for_vision. The context of siblings implies it is for format conversion, but no direct comparisons or exclusion criteria are given.

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.

TDQS

A3.9/5.0
Disambiguation3/5

Most tools are distinct, but compress_image, convert_image, and optimize_generated_image overlap heavily: all re-encode images with format and quality options. The descriptions clarify intent, yet an agent could still struggle to pick between compressing, converting, and optimizing in some cases.

Naming Consistency4/5

The set mostly follows a verb_noun pattern (analyze_image, compress_image, crop_image, resize_image). Minor deviations include image_pipeline, which is a noun phrase, and optimize_for_vision/optimize_generated_image, which use longer prepositional forms, but the overall pattern is predictable.

Tool Count5/5

Ten tools is well within the ideal range for an image-processing server. Each tool serves a meaningful purpose, and the count feels neither bloated nor thin.

Completeness4/5

Core image operations are well covered: analyze, resize, crop, convert, compress, pipeline, plus cost/format introspection. Minor gaps like rotate/flip or explicit metadata editing are absent, but agents can accomplish most workflows with the existing surface.

Resources