Skip to main content
Glama

Image Resize & Convert Tools (Tanod)

image_compress

Idempotent

imagepeek: Compress an image, optionally to a byte budget. To change the format only use image_convert. Returns a smaller JPEG, WebP, AVIF or PNG (or original if not smaller). With max_bytes, default fit: quality keeps dimensions; fit: downscale tries up to 6 aspect-preserving reductions, quality >=10, min_side=256, never upscales, one time budget. Check target_met. 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.003. Free: 3 imagepeek calls per IP per UTC day. Docs: https://tanod.dev/learn/image-compress-api.html

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_compress"
  }
}

Input Schema

NameRequiredDescriptionDefault
fitNoRequires max_bytes when supplied. quality (default) keeps dimensions; downscale tries up to 6 smaller sizes with the same aspect ratio, searching quality >= 10 at each size under one time budget. Check target_met; fitting is not guaranteed. Downscale requires quality >= 10 if set.quality
urlNoPublic http(s) URL of the image (at most 10 MB; private, internal and IP-literal hosts are refused); or use image_base64.
colorsNopng: quantise to this many colours.
formatNoOutput format: jpeg, png, webp or avif (default: the input's).
outputNobase64 (default): inline. url: stored for 24 hours; link, metadata.base64
qualityNoTarget (or, with max_bytes, highest) quality.
keep_iccNoKeep the ICC colour profile.
losslessNowebp only: lossless encoding.
min_sideNodownscale only: shortest-side floor in pixels. Inputs already below this floor are not resized; never upscales.
max_bytesNoSize target: the highest quality that fits.
auto_orientNoApply the EXIF orientation first.
progressiveNojpeg only: progressive encoding.
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
urlNo
bytesNo
errorNoOnly on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object.
inputNo
notesNo
widthNo
formatNo
heightNo
sha256No
sourceNo
encodesNo
final_urlNo
operationNo
expires_atNo
source_urlNo
target_metNo
after_bytesNo
data_base64No
saved_bytesNo
saved_ratioNo
before_bytesNo
content_typeNo
quality_usedNo
scale_factorNo
downscale_stepsNo
returned_originalNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed34 schema fields changed
    • changedInput schema / properties / auto_orient / description
      Previous value: -"Apply the EXIF orientation first (default true)."New value: +"Apply the EXIF orientation first."
    • removedInput schema / properties / auto_orient / title
      Removed value: -"Auto Orient"
    • removedInput schema / properties / colors / default
      Removed value: -null
    • removedInput schema / properties / colors / title
      Removed value: -"Colors"
    • removedInput schema / properties / fit / title
      Removed value: -"Fit"
    • removedInput schema / properties / format / default
      Removed value: -null
    • removedInput schema / properties / format / title
      Removed value: -"Format"
    • removedInput schema / properties / image_base64 / default
      Removed value: -null
    • removedInput schema / properties / image_base64 / title
      Removed value: -"Image Base64"
    • changedInput schema / properties / keep_icc / description
      Previous value: -"Keep the ICC colour profile (default true)."New value: +"Keep the ICC colour profile."
    • removedInput schema / properties / keep_icc / title
      Removed value: -"Keep Icc"
    • changedInput schema / properties / lossless / description
      Previous value: -"webp only: lossless encoding (default false)."New value: +"webp only: lossless encoding."
    • removedInput schema / properties / lossless / title
      Removed value: -"Lossless"
    • removedInput schema / properties / max_bytes / default
      Removed value: -null
    • removedInput schema / properties / max_bytes / title
      Removed value: -"Max Bytes"
    • changedInput schema / properties / min_side / description
      Previous value: -"downscale only: shortest-side floor in pixels (1-32768, default 256). Inputs already below this floor are not resized; never upscales."New value: +"downscale only: shortest-side floor in pixels. Inputs already below this floor are not resized; never upscales."
    • removedInput schema / properties / min_side / title
      Removed value: -"Min Side"
    • removedInput schema / properties / output / title
      Removed value: -"Output"
    • changedInput schema / properties / progressive / description
      Previous value: -"jpeg only: progressive encoding (default false)."New value: +"jpeg only: progressive encoding."
    • removedInput schema / properties / progressive / title
      Removed value: -"Progressive"
    • removedInput schema / properties / quality / default
      Removed value: -null
    • removedInput schema / properties / quality / title
      Removed value: -"Quality"
    • removedInput schema / properties / url / default
      Removed value: -null
    • removedInput schema / properties / url / title
      Removed value: -"Url"
    • removedInput schema / title
      Removed value: -"image_compressArguments"
    • removedOutput schema / properties / bytes / description
      Removed value: -"Bytes."
    • removedOutput schema / properties / content_type / description
      Removed value: -"MIME type."
    • removedOutput schema / properties / downscale_steps / description
      Removed value: -"downscale only: smaller sizes searched (0-6)."
    • removedOutput schema / properties / expires_at / description
      Removed value: -"UTC expiry."
    • removedOutput schema / properties / input / properties
      Removed value: -{
      -  "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"
      -    ]
      -  }
      -}
    • removedOutput schema / properties / notes / items
      Removed value: -{
      -  "type": [
      -    "string",
      -    "null"
      -  ]
      -}
    • removedOutput schema / properties / scale_factor / description
      Removed value: -"downscale only: uniform scale relative to the EXIF-oriented input, before rounding dimensions; 1 for an unchanged original."
    • removedOutput schema / properties / sha256 / description
      Removed value: -"SHA-256."
    • removedOutput schema / properties / url / description
      Removed value: -"Public link."
  2. 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."
  3. Changed4 schema fields changed
    • addedInput schema / properties / fit
      Added value: +{
      +  "default": "quality",
      +  "description": "Requires max_bytes when supplied. quality (default) keeps dimensions; downscale tries up to 6 smaller sizes with the same aspect ratio, searching quality >= 10 at each size under one time budget. Check target_met; fitting is not guaranteed. Downscale requires quality >= 10 if set.",
      +  "enum": [
      +    "quality",
      +    "downscale"
      +  ],
      +  "title": "Fit",
      +  "type": "string"
      +}
    • addedInput schema / properties / min_side
      Added value: +{
      +  "default": 256,
      +  "description": "downscale only: shortest-side floor in pixels (1-32768, default 256). Inputs already below this floor are not resized; never upscales.",
      +  "maximum": 32768,
      +  "minimum": 1,
      +  "title": "Min Side",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / downscale_steps
      Added value: +{
      +  "description": "downscale only: smaller sizes searched (0-6).",
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / scale_factor
      Added value: +{
      +  "description": "downscale only: uniform scale relative to the EXIF-oriented input, before rounding dimensions; 1 for an unchanged original.",
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
  4. 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"
      +  ]
      +}
  5. Changed7 schema fields changed
    • addedInput schema / properties / auto_orient / description
      Added value: +"Apply the EXIF orientation first (default true)."
    • addedInput schema / properties / format / description
      Added value: +"Output format: jpeg, png, webp or avif (default: the input's)."
    • addedInput schema / properties / keep_icc / description
      Added value: +"Keep the ICC colour profile (default true)."
    • addedInput schema / properties / lossless / description
      Added value: +"webp only: lossless encoding (default false)."
    • addedInput schema / properties / progressive / description
      Added value: +"jpeg only: progressive encoding (default false)."
    • 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": {
      +    "after_bytes": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "before_bytes": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "bytes": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "content_type": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "data_base64": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "encodes": {
      +      "type": [
      +        "integer",
      +        "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"
      +      ]
      +    },
      +    "quality_used": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "returned_original": {
      +      "type": [
      +        "boolean",
      +        "null"
      +      ]
      +    },
      +    "saved_bytes": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    },
      +    "saved_ratio": {
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "source": {
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "source_url": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "target_met": {
      +      "type": [
      +        "boolean",
      +        "null"
      +      ]
      +    },
      +    "width": {
      +      "type": [
      +        "integer",
      +        "null"
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  6. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes far beyond the annotations (readOnlyHint false, idempotent, openWorld): discloses accepted input formats, the 40 MP refusal, the 15 MB/50 MP 413 limit, that refusals are not charged, metadata stripping (EXIF/GPS/XMP/IPTC), no image logging, 24 h retention only for `output: url`, latency, and price/free-quota. That is exactly the operational context needed before invoking a paid, non-reversible-priced compute call.

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-loads purpose, then alternative, then behavior, then limits, price and docs — a sensible order with no filler sentences. It is, however, a dense run-on block mixing policy (price/quota) into the core description, which slightly hurts scannability.

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 13-parameter tool with no required fields, the description covers input constraints, output shape, failure modes (413, refusal), retention, and cost. With an output schema present it correctly avoids over-documenting return fields while still flagging `target_met` and the base64 payload.

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 schema already carries parameter documentation; the description still adds value by explaining the downscale search strategy (up to 6 aspect-preserving steps, quality >= 10 floor, min_side 256, never upscales, single time budget) and the quality-vs-max_bytes relationship. Most of this is echoed in the schema, so it is an increment rather than new semantics.

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 concrete verb and resource ('Compress an image, optionally to a byte budget') and immediately distinguishes itself from the sibling image_convert ('To change the format only use image_convert'). The output-format list and the max_bytes mode make the capability unmistakable.

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?

Explicitly routes the agent away to image_convert for format-only changes, and explains the choice between fit modes and what to check afterwards ('Check `target_met`'). It also defines the fallback behavior: returns the original if compression isn't smaller.

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.