Skip to main content
Glama

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 resized image; gravity anchors a cover crop. PNG, JPEG, WebP, GIF, TIFF, BMP, ICO, AVIF; unsupported or >40 MP: not charged. Re-encoding strips EXIF/GPS/XMP/IPTC. Output >15 MB or >50 MP: uncharged 413. 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

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

Input Schema

NameRequiredDescriptionDefault
fitNoWith both dimensions: inside fits, contain pads, cover crops; all keep aspect. fill stretches.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.
widthNoWidth in pixels; use width and/or height, or scale.
formatNoOutput format (default: the input's; ICO in, PNG out).
heightNoHeight in pixels.
outputNobase64 (default): inline. url: stored for 24 hours; link, metadata.base64
gravityNoCrop anchor; default center. Needs cover and both dimensions.
qualityNoEncoder quality 1-100 (lossy formats).
upscaleNoAllow enlargement.
losslessNoLossless WebP.
optimizeNoSlower, smaller PNG.
resampleNoResampling filter.lanczos
backgroundNoContain padding; default transparent/white.
auto_orientNoApply the EXIF orientation first.
progressiveNoProgressive JPEG.
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
final_urlNo
operationNo
expires_atNo
source_urlNo
data_base64No
content_typeNo
upscale_preventedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changed
    • changedInput schema / properties / background / description
      Previous value: -"contain padding colour (default transparent / white)."New value: +"Contain padding; default transparent/white."
    • changedInput schema / properties / fit / description
      Previous value: -"With width and height: inside (default; fit within, keep aspect), contain (fit within, padded to the exact box), cover (crop to fill) or fill (stretch)."New value: +"With both dimensions: inside fits, contain pads, cover crops; all keep aspect. fill stretches."
    • changedInput schema / properties / gravity / description
      Previous value: -"Crop anchor (default center); requires fit=cover and both dimensions."New value: +"Crop anchor; default center. Needs cover and both dimensions."
    • changedInput schema / properties / height / description
      Previous value: -"Target height in pixels."New value: +"Height in pixels."
    • changedInput schema / properties / lossless / description
      Previous value: -"webp output: lossless encoding."New value: +"Lossless WebP."
    • changedInput schema / properties / optimize / description
      Previous value: -"png output: maximum (slower) compression."New value: +"Slower, smaller PNG."
    • changedInput schema / properties / progressive / description
      Previous value: -"jpeg output: progressive encoding."New value: +"Progressive JPEG."
    • changedInput schema / properties / resample / description
      Previous value: -"Resampling filter: nearest, box, bilinear, hamming, bicubic or lanczos (default)."New value: +"Resampling filter."
    • changedInput schema / properties / upscale / description
      Previous value: -"Allow output larger than the input."New value: +"Allow enlargement."
    • changedInput schema / properties / width / description
      Previous value: -"Target width in pixels; give width, height, both, or scale."New value: +"Width in pixels; use width and/or height, or scale."
  2. Changed2 schema fields changed
    • changedInput schema / properties / fit / description
      Previous 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)."New value: +"With width and height: inside (default; fit within, keep aspect), contain (fit within, padded to the exact box), cover (crop to fill) or fill (stretch)."
    • addedInput schema / properties / gravity
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "center",
      +        "north",
      +        "south",
      +        "east",
      +        "west",
      +        "northwest",
      +        "northeast",
      +        "southwest",
      +        "southeast"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Crop anchor (default center); requires fit=cover and both dimensions."
      +}
  3. Changed37 schema fields changed
    • removedInput schema / properties / auto_orient / title
      Removed value: -"Auto Orient"
    • removedInput schema / properties / background / default
      Removed value: -null
    • removedInput schema / properties / background / title
      Removed value: -"Background"
    • 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 / height / default
      Removed value: -null
    • changedInput schema / properties / height / description
      Previous value: -"Target height in pixels (1-32768)."New value: +"Target height in pixels."
    • removedInput schema / properties / height / title
      Removed value: -"Height"
    • removedInput schema / properties / image_base64 / default
      Removed value: -null
    • removedInput schema / properties / image_base64 / title
      Removed value: -"Image Base64"
    • changedInput schema / properties / lossless / description
      Previous value: -"webp output: lossless encoding (default false)."New value: +"webp output: lossless encoding."
    • removedInput schema / properties / lossless / title
      Removed value: -"Lossless"
    • changedInput schema / properties / optimize / description
      Previous value: -"png output: maximum (slower) compression (default false)."New value: +"png output: maximum (slower) compression."
    • removedInput schema / properties / optimize / title
      Removed value: -"Optimize"
    • removedInput schema / properties / output / title
      Removed value: -"Output"
    • changedInput schema / properties / progressive / description
      Previous value: -"jpeg output: progressive encoding (default false)."New value: +"jpeg output: 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 / resample / title
      Removed value: -"Resample"
    • removedInput schema / properties / scale / default
      Removed value: -null
    • removedInput schema / properties / scale / title
      Removed value: -"Scale"
    • removedInput schema / properties / upscale / title
      Removed value: -"Upscale"
    • removedInput schema / properties / url / default
      Removed value: -null
    • removedInput schema / properties / url / title
      Removed value: -"Url"
    • removedInput schema / properties / width / default
      Removed value: -null
    • changedInput schema / properties / width / description
      Previous value: -"Target width in pixels (1-32768); give width, height, both, or scale."New value: +"Target width in pixels; give width, height, both, or scale."
    • removedInput schema / properties / width / title
      Removed value: -"Width"
    • removedInput schema / title
      Removed value: -"image_resizeArguments"
    • removedOutput schema / properties / bytes / description
      Removed value: -"Bytes."
    • removedOutput schema / properties / content_type / description
      Removed value: -"MIME type."
    • 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 / sha256 / description
      Removed value: -"SHA-256."
    • removedOutput schema / properties / url / description
      Removed value: -"Public link."
  4. 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."
  5. 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"
      +  ]
      +}
  6. 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"
      +}
  7. Added

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare idempotent=true and destructiveHint=false, and the description adds genuinely useful context: EXIF/GPS/XMP/IPTC is stripped on re-encode, unsupported or >40 MP inputs are not charged, oversized output returns an uncharged 413, and results are only retained 24 h when output="url". Those are real costs and side effects an agent must anticipate. It does not describe the response shape, but an output schema exists, so the gap is minor.

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 first sentence is a tight routing header and every later clause carries operational facts (limits, price, latency, retention). It is, however, a dense semicolon chain that mixes billing, format support, and privacy in one paragraph — slightly harder to scan than a tiered structure would be.

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 17-parameter tool with no required fields, the description supplies size limits (10 MB in, >15 MB/>50 MP out), supported formats, timing, cost, free tier, retention, and a docs link. Combined with full schema coverage, an output schema, and annotations, nothing needed to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so fit, gravity, output, scale, and every flag are already documented with defaults and enums. The description's only parameter-level addition is "`gravity` anchors a cover crop" and the format list, both of which restate schema text. Baseline 3 is appropriate when the schema carries parameter meaning.

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?

"Resize an image" is a specific verb plus resource, and the description immediately differentiates it from image_thumbnail ("several sizes in one call") and image_crop ("a box or ratio"). An agent can pick the right tool without opening a 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?

It names two alternatives explicitly and gives the exact condition that selects each (multiple sizes → thumbnail; box or ratio → crop). That is a complete routing rule, not an implied one, and it is front-loaded before any bulk detail.

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