Skip to main content
Glama

resize_image

Resize an image

Scale an image by a factor, or fill an exact box. Use 'scale' for uniform scaling, or 'scale_x'/'scale_y' for independent axes (float factors, e.g. 0.5 = half size). Alternatively set 'width'+'height' for fill mode: resize and smart-crop to those exact dimensions in one call (optional 'gravity', default attention). The two modes are mutually exclusive. Optional enhancement modifiers: denoise (1-3), equalize, sharpen (applied denoise -> equalize -> op -> sharpen).

Responses:

200: Processed image binary (Success Response) Content-Type: application/json Content-Type: image/jpeg

Example Response:

"string"

Content-Type: image/png

Example Response:

"string"

Content-Type: image/webp

Example Response:

"string"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scaleNoUniform scale factor applied to both axes (e.g. 0.5 = half size). Use this for simple scaling; use scale_x/scale_y for independent axes.
widthNoTarget width in pixels for fill mode: resize and smart-crop to these exact dimensions in one call. Requires height. Mutually exclusive with scale/scale_x/scale_y. Upscaling is allowed.
formatNoOutput format: jpeg, png, webp, tiff, gif, or avif. If omitted, the original format is preserved.
heightNoTarget height in pixels for fill mode. Requires width.
sourceYesImage source: a public URL (https://...) or a base64-encoded string (optionally as a data URI like data:image/png;base64,...).
autorotNoApply EXIF orientation before resizing. Opt-in; default false, which preserves current byte-for-byte behavior.
denoiseNoMedian denoise before resizing: radius 1-3 (window 3x3 to 7x7). Opt-in; no surcharge.
gravityNoFill-mode smart-crop strategy: one of ('attention', 'entropy', 'centre'). Only valid together with width and height; defaults to attention.
scale_xNoHorizontal scale factor (e.g. 0.5 = half width). If only scale_x is given, scale_y defaults to the same value.
scale_yNoVertical scale factor (e.g. 0.75 = 75% height). Optional; defaults to scale_x if omitted.
sharpenNoUnsharp-mask sharpen after resizing (libvips defaults). Opt-in.
deliveryNo
equalizeNoAuto-contrast (histogram equalisation of the value channel; hue and saturation preserved) before resizing. Opt-in.

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden. It thoroughly discloses behavioral traits: mutual exclusivity of scaling/fill modes, smart-crop default gravity, enhancement modifier order, delivery options (inline, put_url, callback), and that upscaling is allowed for fill mode. It also transparently describes delivery security details (HMAC signing, no credential storage). Minor gap: it doesn’t mention whether input source supports all formats for output.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose in the first sentence, then dives into mode details, enhancement order, and delivery options. Every sentence adds value—no fluff. The response section is well-structured with clear HTTP status codes and example content types. At 13 lines of prose plus structured response info, it’s appropriately sized for a tool with 13 parameters and complex mode logic.

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?

While the description is thorough, it doesn't explain return values explicitly—though there is no output schema, the response section lists Content-Type headers providing some shape. It could mention that the result is the processed image binary for inline delivery. For a tool with 13 parameters and no output schema, the description covers the essential semantics and mode selection effectively.

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 very high (92%), so baseline is 3. The description adds significant value beyond the schema by clarifying the overall workflow (two modes, mutual exclusivity) and the enhancement pipeline order (denoise -> equalize -> op -> sharpen). It also explains gravity options succinctly. The description doesn’t add detail for every parameter (e.g., 'autorot' is not mentioned besides listing), but the schema already covers those well.

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?

The description clearly states the tool resizes images and distinguishes two main modes: uniform scaling via 'scale' or 'scale_x'/'scale_y', and exact fill via 'width'+'height' with smart-crop. It also mentions optional enhancement modifiers. This verb-resource definition effectively differentiates it from sibling tools like crop_image, compress_image, and convert_image.

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?

The description provides explicit when-to-use guidance by describing the two mutually exclusive modes and their use cases ('scale' for uniform scaling, 'scale_x'/'scale_y' for independent axes, 'width'+'height' for fill mode with smart-crop). It does not explicitly mention when NOT to use this tool or suggest alternatives like crop_image or compress_image, which would elevate it to a 5.

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.

TDQS

A4/5.0
Disambiguation4/5

Most tools have clearly distinct purposes (analyze, compress, convert, crop, resize, pipeline, optimize_for_vision, optimize_generated_image). However, there is some overlap between compress_image and convert_image (both deal with quality settings and can change format), and between resize_image and crop_image (resize's fill mode with smart-crop overlaps crop's smart crop). The pipeline tool could theoretically subsume any of the single-operation tools, which introduces a slight ambiguity in when to use pipeline vs. individual tools.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern (analyze_image, compress_image, convert_image, crop_image, get_format_info, image_pipeline, optimize_for_vision, optimize_generated_image, resize_image). The naming is predictable and self-documenting, with no mixing of camelCase or other conventions.

Tool Count5/5

With 9 tools, the server is well-scoped for an image processing domain. Each tool covers a core operation (analyze, compress, convert, crop, resize, pipeline, format info, and two optimization tools). The count feels appropriate—not too few to limit usefulness, not too many to be overwhelming.

Completeness5/5

The tool set provides comprehensive coverage for common image manipulation tasks: analysis, compression, format conversion, cropping, resizing, optimization for both general and AI-generated images, and a pipeline for chaining operations. Missing features like rotation, flipping, or color adjustments are minor but the core CRUD-like operations (read/analyze, write/convert, resize/crop) are well-represented, and the pipeline tool mitigates gaps by allowing combinations.

Resources