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.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed3 schema fields changed
    • addedInput schema / properties / denoise
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Median denoise before converting: radius 1-3 (window 3x3 to 7x7). Opt-in; no surcharge.",
      +  "title": "denoise",
      +  "type": "integer"
      +}
    • addedInput schema / properties / equalize
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Auto-contrast (histogram equalisation of the value channel; hue and saturation preserved) before converting. Opt-in.",
      +  "title": "equalize",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / sharpen
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Unsharp-mask sharpen after converting (libvips defaults). Opt-in.",
      +  "title": "sharpen",
      +  "type": "boolean"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / autorot
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Apply EXIF orientation before converting. Opt-in; default false, which preserves current byte-for-byte behavior.",
      +  "title": "autorot",
      +  "type": "boolean"
      +}
  3. Changed1 schema field changed
    • addedInput schema / properties / quality_target
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "number"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Target 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.",
      +  "title": "quality_target",
      +  "type": "number"
      +}
  4. Changed3 schema fields changed
    • addedInput schema / properties / effort
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "AV1 encoder CPU effort (0-9). Higher = smaller file, slower. Only applies to avif.",
      +  "title": "effort",
      +  "type": "integer"
      +}
    • changedInput schema / properties / format / description
      Previous value: -"Target format: jpeg, png, webp, tiff, or gif."New value: +"Target format: jpeg, png, webp, tiff, gif, or avif."
    • changedInput schema / properties / lossless / description
      Previous value: -"Enable lossless encoding. Only applies to webp."New value: +"Enable lossless encoding. Only applies to webp and avif."
  5. Changed1 schema field changed
    • changedInput schema / properties / delivery / oneOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "mode": {
      -        "const": "inline",
      -        "default": "inline",
      -        "title": "Mode",
      -        "type": "string"
      -      }
      -    },
      -    "title": "InlineDelivery",
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "headers": {
      -        "anyOf": [
      -          {
      -            "additionalProperties": {
      -              "type": "string"
      -            },
      -            "type": "object"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "Optional storage headers to include on the PUT call (Content-Type, Cache-Control, x-amz-acl, etc.). Whitelisted at SSRF layer.",
      -        "title": "Headers"
      -      },
      -      "mode": {
      -        "const": "put_url",
      -        "title": "Mode",
      -        "type": "string"
      -      },
      -      "put_url": {
      -        "description": "Customer-signed presigned PUT URL where the optimized bytes will be written. Must be https://. Cloud credentials never reach our infrastructure; only the URL itself is used and discarded after the request.",
      -        "format": "uri",
      -        "maxLength": 2083,
      -        "minLength": 1,
      -        "title": "Put Url",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "mode",
      -      "put_url"
      -    ],
      -    "title": "PutUrlDelivery",
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "callback_url": {
      -        "description": "Customer endpoint where the optimized bytes will be POSTed. Must be https://. For async/large jobs. We send an X-Pig-Sha256 header of the body so the receiver can verify integrity. No credentials are stored on our side; secure the endpoint with a token in the URL itself.",
      -        "format": "uri",
      -        "maxLength": 2083,
      -        "minLength": 1,
      -        "title": "Callback Url",
      -        "type": "string"
      -      },
      -      "headers": {
      -        "anyOf": [
      -          {
      -            "additionalProperties": {
      -              "type": "string"
      -            },
      -            "type": "object"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "Optional headers to include on the POST call (Content-Type, Cache-Control, x-amz-*, etc.). Whitelisted at SSRF layer.",
      -        "title": "Headers"
      -      },
      -      "mode": {
      -        "const": "callback_url",
      -        "title": "Mode",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "mode",
      -      "callback_url"
      -    ],
      -    "title": "CallbackDelivery",
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "mode": {
      +        "const": "inline",
      +        "default": "inline",
      +        "title": "Mode",
      +        "type": "string"
      +      }
      +    },
      +    "title": "InlineDelivery",
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "headers": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": {
      +              "type": "string"
      +            },
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Optional storage headers to include on the PUT call (Content-Type, Cache-Control, x-amz-acl, etc.). Whitelisted at SSRF layer.",
      +        "title": "Headers"
      +      },
      +      "mode": {
      +        "const": "put_url",
      +        "title": "Mode",
      +        "type": "string"
      +      },
      +      "put_url": {
      +        "description": "Customer-signed presigned PUT URL where the optimized bytes will be written. Must be https://. Cloud credentials never reach our infrastructure; only the URL itself is used and discarded after the request.",
      +        "format": "uri",
      +        "maxLength": 2083,
      +        "minLength": 1,
      +        "title": "Put Url",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "mode",
      +      "put_url"
      +    ],
      +    "title": "PutUrlDelivery",
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "callback_url": {
      +        "description": "Customer endpoint where the optimized bytes will be POSTed. Must be https://. For async/large jobs. We send an X-Pig-Sha256 header of the body so the receiver can verify integrity. No credentials are stored on our side; secure the endpoint with a token in the URL itself.",
      +        "format": "uri",
      +        "maxLength": 2083,
      +        "minLength": 1,
      +        "title": "Callback Url",
      +        "type": "string"
      +      },
      +      "headers": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": {
      +              "type": "string"
      +            },
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Optional headers to include on the POST call (Content-Type, Cache-Control, x-amz-*, etc.). Whitelisted at SSRF layer.",
      +        "title": "Headers"
      +      },
      +      "mode": {
      +        "const": "callback_url",
      +        "title": "Mode",
      +        "type": "string"
      +      },
      +      "secret": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Optional HMAC secret. When set, we sign the POST body with HMAC-SHA256 and send 'X-Pig-Signature: sha256=<hex>'. Used per request and never stored. Recompute the HMAC on your endpoint to authenticate the callback (constant-time compare).",
      +        "title": "Secret"
      +      }
      +    },
      +    "required": [
      +      "mode",
      +      "callback_url"
      +    ],
      +    "title": "CallbackDelivery",
      +    "type": "object"
      +  }
      +]
  6. Changed2 schema fields changed
    • addedInput schema / properties / delivery / discriminator / mapping / callback_url
      Added value: +"#/components/schemas/CallbackDelivery"
    • changedInput schema / properties / delivery / oneOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "mode": {
      -        "const": "inline",
      -        "default": "inline",
      -        "title": "Mode",
      -        "type": "string"
      -      }
      -    },
      -    "title": "InlineDelivery",
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "headers": {
      -        "anyOf": [
      -          {
      -            "additionalProperties": {
      -              "type": "string"
      -            },
      -            "type": "object"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "Optional storage headers to include on the PUT call (Content-Type, Cache-Control, x-amz-acl, etc.). Whitelisted at SSRF layer.",
      -        "title": "Headers"
      -      },
      -      "mode": {
      -        "const": "put_url",
      -        "title": "Mode",
      -        "type": "string"
      -      },
      -      "put_url": {
      -        "description": "Customer-signed presigned PUT URL where the optimized bytes will be written. Must be https://. Cloud credentials never reach our infrastructure; only the URL itself is used and discarded after the request.",
      -        "format": "uri",
      -        "maxLength": 2083,
      -        "minLength": 1,
      -        "title": "Put Url",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "mode",
      -      "put_url"
      -    ],
      -    "title": "PutUrlDelivery",
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "mode": {
      +        "const": "inline",
      +        "default": "inline",
      +        "title": "Mode",
      +        "type": "string"
      +      }
      +    },
      +    "title": "InlineDelivery",
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "headers": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": {
      +              "type": "string"
      +            },
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Optional storage headers to include on the PUT call (Content-Type, Cache-Control, x-amz-acl, etc.). Whitelisted at SSRF layer.",
      +        "title": "Headers"
      +      },
      +      "mode": {
      +        "const": "put_url",
      +        "title": "Mode",
      +        "type": "string"
      +      },
      +      "put_url": {
      +        "description": "Customer-signed presigned PUT URL where the optimized bytes will be written. Must be https://. Cloud credentials never reach our infrastructure; only the URL itself is used and discarded after the request.",
      +        "format": "uri",
      +        "maxLength": 2083,
      +        "minLength": 1,
      +        "title": "Put Url",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "mode",
      +      "put_url"
      +    ],
      +    "title": "PutUrlDelivery",
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "callback_url": {
      +        "description": "Customer endpoint where the optimized bytes will be POSTed. Must be https://. For async/large jobs. We send an X-Pig-Sha256 header of the body so the receiver can verify integrity. No credentials are stored on our side; secure the endpoint with a token in the URL itself.",
      +        "format": "uri",
      +        "maxLength": 2083,
      +        "minLength": 1,
      +        "title": "Callback Url",
      +        "type": "string"
      +      },
      +      "headers": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": {
      +              "type": "string"
      +            },
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Optional headers to include on the POST call (Content-Type, Cache-Control, x-amz-*, etc.). Whitelisted at SSRF layer.",
      +        "title": "Headers"
      +      },
      +      "mode": {
      +        "const": "callback_url",
      +        "title": "Mode",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "mode",
      +      "callback_url"
      +    ],
      +    "title": "CallbackDelivery",
      +    "type": "object"
      +  }
      +]
  7. Changed1 schema field changed
    • addedInput schema / properties / delivery
      Added value: +{
      +  "discriminator": {
      +    "mapping": {
      +      "inline": "#/components/schemas/InlineDelivery",
      +      "put_url": "#/components/schemas/PutUrlDelivery"
      +    },
      +    "propertyName": "mode"
      +  },
      +  "oneOf": [
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "mode": {
      +          "const": "inline",
      +          "default": "inline",
      +          "title": "Mode",
      +          "type": "string"
      +        }
      +      },
      +      "title": "InlineDelivery",
      +      "type": "object"
      +    },
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "headers": {
      +          "anyOf": [
      +            {
      +              "additionalProperties": {
      +                "type": "string"
      +              },
      +              "type": "object"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "Optional storage headers to include on the PUT call (Content-Type, Cache-Control, x-amz-acl, etc.). Whitelisted at SSRF layer.",
      +          "title": "Headers"
      +        },
      +        "mode": {
      +          "const": "put_url",
      +          "title": "Mode",
      +          "type": "string"
      +        },
      +        "put_url": {
      +          "description": "Customer-signed presigned PUT URL where the optimized bytes will be written. Must be https://. Cloud credentials never reach our infrastructure; only the URL itself is used and discarded after the request.",
      +          "format": "uri",
      +          "maxLength": 2083,
      +          "minLength": 1,
      +          "title": "Put Url",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "mode",
      +        "put_url"
      +      ],
      +      "title": "PutUrlDelivery",
      +      "type": "object"
      +    }
      +  ],
      +  "title": "delivery",
      +  "type": "string"
      +}
  8. Changed2 schema fields changed
    • addedInput schema / properties / q
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Quality (1-100). Maps to libvips Q parameter.",
      +  "title": "q",
      +  "type": "integer"
      +}
    • removedInput schema / properties / quality
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "integer"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "description": "Output quality (1-100). Only applies to lossy formats (jpeg, webp).",
      -  "title": "quality",
      -  "type": "integer"
      -}
  9. First observed

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