Skip to main content
Glama

imagepeek: resize an image

image_resize
Idempotent

imagepeek: Resize an image. For several sizes in one call use image_thumbnail; for a box or ratio use image_crop. Returns the image resized to width and/or height (or by scale) with fit inside (default), contain (letterboxed on background), cover (centre crop) or fill (stretched), Lanczos by default; never upscaled unless upscale is true (then upscale_prevented says so). 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-resize-api.html

Input Schema

NameRequiredDescriptionDefault
fitNoWith width and height: inside (default; fit within, keep aspect), contain (fit within, padded to the exact box), cover (fill the box, centre crop) or fill (stretch).inside
urlNoPublic http(s) URL of the image (at most 10 MB; private, internal and IP-literal hosts are refused); or use image_base64.
scaleNoInstead of width/height.
widthNoTarget width in pixels (1-32768); give width, height, both, or scale.
formatNoOutput format (default: the input's; ICO in, PNG out).
heightNoTarget height in pixels (1-32768).
outputNobase64 (default): inline. url: stored for 24 hours; link, metadata.base64
qualityNoEncoder quality 1-100 (lossy formats).
upscaleNoAllow output larger than the input.
losslessNowebp output: lossless encoding (default false).
optimizeNopng output: maximum (slower) compression (default false).
resampleNoResampling filter: nearest, box, bilinear, hamming, bicubic or lanczos (default).lanczos
backgroundNocontain padding colour (default transparent / white).
auto_orientNoApply the EXIF orientation first.
progressiveNojpeg output: progressive encoding (default false).
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.
upscale_preventedNo

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. Changed9 schema fields changed
    • addedInput schema / properties / fit / description
      Added value: +"With width and height: inside (default; fit within, keep aspect), contain (fit within, padded to the exact box), cover (fill the box, centre crop) or fill (stretch)."
    • addedInput schema / properties / height / description
      Added value: +"Target height in pixels (1-32768)."
    • addedInput schema / properties / lossless / description
      Added value: +"webp output: lossless encoding (default false)."
    • addedInput schema / properties / optimize / description
      Added value: +"png output: maximum (slower) compression (default false)."
    • addedInput schema / properties / progressive / description
      Added value: +"jpeg output: progressive encoding (default false)."
    • addedInput schema / properties / resample / description
      Added value: +"Resampling filter: nearest, box, bilinear, hamming, bicubic or lanczos (default)."
    • 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."
    • addedInput schema / properties / width / description
      Added value: +"Target width in pixels (1-32768); give width, height, both, or scale."
    • 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"
      +      ]
      +    },
      +    "upscale_prevented": {
      +      "type": [
      +        "boolean",
      +        "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?

Annotations only give the generic profile (readOnly=false because output=url stores, idempotent, openWorld), and the description dramatically adds to it: never-upscaled default with an upscale_prevented flag, supported input formats, 40 MP refusal (not charged), 15 MB/50 MP 413 limit (not charged), no logging, 24 h retention only for output=url, latency and price. That is exactly the extra context 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?

Purpose and sibling routing are front-loaded, and every clause carries usable information (limits, pricing, retention). It is a single dense run-on paragraph, though, and splitting the constraint/limit material from the core behavior would improve 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 16-parameter, zero-required tool with an output schema, the description covers input sourcing (url vs image_base64), mutation/retention semantics, failure modes, and return shape, so an agent has everything needed to call it correctly. The output schema plus annotations fill the remaining gaps.

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 baseline is 3; the description adds genuine meaning on top by explaining fit modes (inside/contain letterboxed on background/cover centre crop/fill stretch), the resample default, and that width/height/scale are alternatives. Most other parameters (quality, progressive, lossless, optimize) are only named in the schema, so it falls short of 5.

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 ('Resize an image') and immediately contrasts with the sibling tools that handle adjacent needs (image_thumbnail for several sizes, image_crop for box/ratio). An agent can pick this tool over image_thumbnail/image_crop without consulting either schema.

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 names the alternatives and the conditions that select them: 'For several sizes in one call use image_thumbnail; for a box or ratio use image_crop.' It also documents when upscaling applies and what happens otherwise, leaving little to inference.

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