Skip to main content
Glama

imagepeek: convert an image to another format

image_convert
Idempotent

imagepeek: Convert an image to PNG, JPEG, WebP, GIF, TIFF, BMP, ICO or AVIF. To shrink the file use image_compress. Returns the image converted to png, jpeg, webp, gif, tiff, bmp, ico (16-256 px icon sizes) or avif, with quality, progressive JPEG, optimized PNG or lossless WebP; transparency is flattened onto background (default white) for jpeg and bmp. Reads PNG, JPEG, WebP, GIF, TIFF, BMP, ICO and AVIF; other formats and images over 40 megapixels are refused (not charged). Output: base64 data_base64, without EXIF, GPS, XMP or IPTC; over 15 MB or 50 megapixels is a 413 (not charged). Images are not logged; a result is kept only with output "url" (24 h). Typically 0.5-2 s. Price: USD 0.002. Free: 3 imagepeek calls per IP per UTC day. Docs: https://tanod.dev/learn/image-convert-api.html

Input Schema

NameRequiredDescriptionDefault
toYespng, jpeg, webp, gif, tiff, bmp, ico or avif.
urlNoPublic http(s) URL of the image (at most 10 MB; private, internal and IP-literal hosts are refused); or use image_base64.
outputNobase64 (default): inline. url: stored for 24 hours; link, metadata.base64
qualityNoEncoder quality 1-100 for lossy formats (default: per format).
losslessNowebp only.
optimizeNopng only.
backgroundNoAlpha is flattened onto this for jpeg/bmp (#ffffff).
auto_orientNoApply the EXIF orientation first (default true).
progressiveNojpeg only.
image_base64NoThe image as standard or url-safe base64 (at most 10 MB decoded; a data:image/...;base64, prefix is fine); or use url.

Output Schema

NameRequiredDescriptionDefault
urlNoPublic link.
bytesNoBytes.
errorNoOnly on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object.
inputNo
notesNo
widthNo
formatNo
heightNo
sha256NoSHA-256.
sourceNo
final_urlNo
operationNo
expires_atNoUTC expiry.
source_urlNo
data_base64No
content_typeNoMIME type.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • changedInput schema / properties / output / description
      Previous value: -"base64 (default): the file comes back inline as base64. url: the file is stored for 24 hours and the reply carries a download link (url, expires_at, bytes, content_type, sha256) instead of the base64, which keeps the file out of your context window."New value: +"base64 (default): inline. url: stored for 24 hours; link, metadata."
    • addedOutput schema / properties / bytes / description
      Added value: +"Bytes."
    • addedOutput schema / properties / content_type / description
      Added value: +"MIME type."
    • addedOutput schema / properties / expires_at / description
      Added value: +"UTC expiry."
    • addedOutput schema / properties / sha256 / description
      Added value: +"SHA-256."
    • addedOutput schema / properties / url / description
      Added value: +"Public link."
  2. Changed4 schema fields changed
    • addedInput schema / properties / output
      Added value: +{
      +  "default": "base64",
      +  "description": "base64 (default): the file comes back inline as base64. url: the file is stored for 24 hours and the reply carries a download link (url, expires_at, bytes, content_type, sha256) instead of the base64, which keeps the file out of your context window.",
      +  "enum": [
      +    "base64",
      +    "url"
      +  ],
      +  "title": "Output",
      +  "type": "string"
      +}
    • addedOutput schema / properties / expires_at
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / sha256
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / url
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  3. Changed4 schema fields changed
    • addedInput schema / properties / auto_orient / description
      Added value: +"Apply the EXIF orientation first (default true)."
    • addedInput schema / properties / quality / description
      Added value: +"Encoder quality 1-100 for lossy formats (default: per format)."
    • changedInput schema / properties / url / description
      Previous value: -"Public http(s) URL of the image (at most 10 MB); or use image_base64."New value: +"Public http(s) URL of the image (at most 10 MB; private, internal and IP-literal hosts are refused); or use image_base64."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "bytes": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "content_type": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "data_base64": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "error": {
      +      "description": "Only on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object."
      +    },
      +    "final_url": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "format": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "height": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "input": {
      +      "properties": {
      +        "animated": {
      +          "type": [
      +            "boolean",
      +            "null"
      +          ]
      +        },
      +        "bytes": {
      +          "type": [
      +            "integer",
      +            "null"
      +          ]
      +        },
      +        "format": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "frames": {
      +          "type": [
      +            "integer",
      +            "null"
      +          ]
      +        },
      +        "has_alpha": {
      +          "type": [
      +            "boolean",
      +            "null"
      +          ]
      +        },
      +        "height": {
      +          "type": [
      +            "integer",
      +            "null"
      +          ]
      +        },
      +        "width": {
      +          "type": [
      +            "integer",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "notes": {
      +      "items": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "type": [
      +        "array",
      +        "null"
      +      ]
      +    },
      +    "operation": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "source": {
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "source_url": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "width": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  4. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnlyHint=false, idempotent, non-destructive): alpha is flattened onto `background` for jpeg/bmp, metadata (EXIF/GPS/XMP/IPTC) is stripped, refusals and 413s are not charged, images are not logged, url results expire after 24 h, and typical latency is 0.5-2 s. This is exactly the kind the annotations cannot convey.

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 intent and the sibling alternative are front-loaded and nearly every clause carries information. It loses a point because the format list is enumerated twice (once as the goal, once again as the return value) and the second sentence is an unusually long run-on that an agent must parse for limits.

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?

For a 10-parameter conversion tool with an output schema, everything an agent needs to call it correctly is present: required `to` values, mutually exclusive input sources, per-format option applicability, size/format limits, cost, and return shape. No meaningful gap remains.

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 baseline is 3, but the description adds real meaning: `background` defaults to white and applies only to jpeg/bmp, `to=ico` yields 16-256 px icon sizes, and quality/progressive/optimize/lossless are tied to specific target formats. Only `auto_orient` and the two input-source parameters are left entirely to the schema.

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?

States a specific verb and resource ('Convert an image to PNG, JPEG, WebP, GIF, TIFF, BMP, ICO or AVIF') and distinguishes itself from a sibling by explicitly deferring file-size reduction to image_compress. An agent can identify this tool's job from the first sentence alone.

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

Usage Guidelines5/5

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

Names the alternative (image_compress) and the condition that selects it, plus explicit boundaries: accepted input formats, the 40-megapixel refusal, the 15 MB / 50 MP output 413, and the free-tier and pricing terms. When-not and alternative routing are both spelled out.

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