Skip to main content
Glama

resize

Adjust image dimensions by width, height, or percent; keep aspect ratio by default, or fit, fill, or stretch to exact dimensions.

Instructions

Resize an image. Give width and/or height (pixels) or percent.

One side only: the other follows the aspect ratio. Both sides, by mode: fit (default) = largest size inside the box, keeps aspect ratio; fill = cover the box and center-crop the overflow (thumbnails, avatars); exact = stretch to exactly width x height.

Never enlarges unless allow_upscale=true (a too-large request keeps the original size and says so). Output goes to photo.resized.jpg next to the input unless output= is given (its extension picks the format, so output='x.webp' resizes and converts). Animated GIF/WebP keep every frame. quality (1-100) applies to JPEG/WebP/AVIF output. keep_metadata=false drops EXIF (including GPS). Existing files are never replaced unless overwrite=true. allow_huge=true lifts the decompression-bomb limit (default 100 MP).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "resize"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNofit
pathYes
widthNo
heightNo
outputNo
percentNo
previewNo
qualityNo
resampleNolanczos
overwriteNo
allow_hugeNo
allow_upscaleNo
keep_metadataNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses the no-upscale default and what happens on a too-large request, the default output filename and that the extension controls format, that all animated frames are preserved, that files are never replaced without overwrite=true, and that a 100 MP decompression-bomb limit exists and can be lifted. This is the kind of mutation-side behavior an agent cannot infer from the name.

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-loaded with one short sentence stating the action, then grouped into topical paragraphs (dimensions/mode, upscaling, output, quality/metadata, safety flags) with no filler. The telegraphic, parenthetical-heavy style packs a lot but costs some readability.

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 13-parameter mutating tool with no annotations and no output schema, the description covers nearly everything an agent needs to invoke it safely. The remaining gaps are the unexplained preview and resample parameters and any statement of what the call returns beyond the implied resized file path.

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 description coverage is 0% across 13 parameters, yet the description explains width/height/percent interaction, the three mode values, output path and format inference, quality's applicable formats, keep_metadata's EXIF/GPS effect, overwrite, allow_huge and allow_upscale. Two parameters, preview and resample, are never mentioned, so it compensates for most but not all of the coverage gap.

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?

Opens with a specific verb+resource ('Resize an image') and immediately scopes the operation to dimension changes via width/height/percent and the fit/fill/exact modes. That implicitly separates it from crop, convert and rotate_flip, but no sibling is ever named, so it stops short of explicit differentiation.

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

Usage Guidelines4/5

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

Gives concrete selection guidance among its own modes — fill is recommended for thumbnails and avatars, exact for stretching, fit as default. It never states when to prefer this tool over convert or crop, so there is no exclusion guidance for cross-tool choice.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.