Skip to main content
Glama

photo_resize

Resize Image — Resize an image by pixel dimensions, percentage, fit-within-max, or exact canvas. Supports maintaining aspect ratio. [category: photo]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesJPG, PNG, WebP, GIF, BMP, TIFF, AVIF, HEIC or HEIF. Output keeps the input format, except that a HEIC or HEIF photo comes back as a JPG.
modeNo'max' fits within width×width and never upscales; 'canvas' resizes then pads to exact WxH with bg_color; 'percentage' scales by %.dimensions
widthNoTarget width in pixels. In 'Fit inside a box' mode this is the longest side the picture may reach.
heightNoTarget height px.
bg_colorNoColour of the padding added around the picture when it does not fill the canvas.white
percentageNoScale to this percent of the original size.
strip_metaNoStrip EXIF metadata from the output.
force_exactNoForce exact dimensions, ignoring aspect ratio.
maintain_ratioNoKeep aspect ratio (dimensions mode). Field name is 'maintain_ratio' — not 'maintain_aspect'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / width / x-ui / pair_label
      Added value: +"Size"
    • addedInput schema / properties / width / x-ui / pair_with
      Added value: +"height"
  2. Changed1 schema field changed
    • changedInput schema / properties / file / description
      Previous value: -"JPG, PNG, WebP, GIF, BMP"New value: +"JPG, PNG, WebP, GIF, BMP, TIFF, AVIF, HEIC or HEIF. Output keeps the input format, except that a HEIC or HEIF photo comes back as a JPG."
  3. Changed3 schema fields changed
    • addedInput schema / properties / height / x-ui
      Added value: +{
      +  "unit": "px"
      +}
    • addedInput schema / properties / percentage / x-ui
      Added value: +{
      +  "unit": "%"
      +}
    • addedInput schema / properties / width / x-ui
      Added value: +{
      +  "unit": "px"
      +}
  4. Changed10 schema fields changed
    • changedInput schema / properties / bg_color / description
      Previous value: -"Canvas background color (mode=canvas)."New value: +"Colour of the padding added around the picture when it does not fill the canvas."
    • addedInput schema / properties / bg_color / x-show-when
      Added value: +{
      +  "mode": [
      +    "canvas"
      +  ]
      +}
    • addedInput schema / properties / force_exact / x-show-when
      Added value: +{
      +  "mode": [
      +    "dimensions"
      +  ]
      +}
    • addedInput schema / properties / height / x-show-when
      Added value: +{
      +  "mode": [
      +    "dimensions",
      +    "height",
      +    "canvas"
      +  ]
      +}
    • addedInput schema / properties / maintain_ratio / x-show-when
      Added value: +{
      +  "mode": [
      +    "dimensions"
      +  ]
      +}
    • addedInput schema / properties / mode / x-ui
      Added value: +{
      +  "labels": {
      +    "canvas": "Pad to an exact canvas",
      +    "dimensions": "Exact width and height",
      +    "height": "Fit to a height",
      +    "max": "Fit inside a box (never enlarge)",
      +    "percentage": "Scale by percent",
      +    "width": "Fit to a width"
      +  }
      +}
    • changedInput schema / properties / percentage / description
      Previous value: -"Scale percentage — REQUIRED when mode=percentage."New value: +"Scale to this percent of the original size."
    • addedInput schema / properties / percentage / x-show-when
      Added value: +{
      +  "mode": [
      +    "percentage"
      +  ]
      +}
    • changedInput schema / properties / width / description
      Previous value: -"Target width px. In the default 'dimensions' mode at least one of width/height is REQUIRED; also required for width/max/canvas modes."New value: +"Target width in pixels. In 'Fit inside a box' mode this is the longest side the picture may reach."
    • addedInput schema / properties / width / x-show-when
      Added value: +{
      +  "mode": [
      +    "dimensions",
      +    "width",
      +    "max",
      +    "canvas"
      +  ]
      +}
  5. First observed

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already carry readOnlyHint=false and destructiveHint=false, so the description is not burdened with a safety disclaimer. It does add behavioral context by noting aspect-ratio preservation and mode-based resizing behavior. It stops short of describing output format or side effects, but the schema's file parameter already documents format behavior such as HEIC/HEIF becoming JPG.

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 concise at roughly 31 words and front-loads the core operation before mentioning aspect-ratio support. There is minor redundancy in repeating 'Resize Image' immediately after the title, but there is no filler or unnecessary detail. Overall, it is appropriately sized for a tool whose schema carries the detailed parameter information.

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 9-parameter tool with a complex mode enum, the description gives an agent the high-level mode taxonomy while the schema provides full per-parameter constraints and conditional visibility rules. The main missing piece is explicit guidance on when to choose this tool over sibling photo tools, which is already penalized in usage_guidelines. No output schema exists, but the input and mode behavior are covered well enough to invoke the tool correctly.

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 description coverage is 100%, so all 9 parameters are already documented in the input schema; the baseline is therefore 3. The description only restates modes at a high level and does not add parameter-specific guidance beyond what the enum labels and x-ui hints provide. It adds no syntax or format details that would elevate the score above baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with 'Resize an image by pixel dimensions, percentage, fit-within-max, or exact canvas,' clearly identifying a specific verb, resource, and the main modes. It also mentions aspect-ratio support, so an agent can immediately recognize the dimension-changing operation. It does not explicitly compare against sibling photo tools like photo_crop or photo_compress, but the resize operation is unmistakable.

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 implies when to use the tool by enumerating target-based modes such as 'fit-within-max' and 'exact canvas,' which gives an agent a decision framework. However, it does not state when to prefer photo_resize over related tools like photo_crop, photo_compress, or photo_editor, nor does it provide exclusions. This is implied usage rather than explicit guidance.

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