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

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses the processing pipeline order (denoise -> equalize -> op -> sharpen), autorot behavior, opt-in features, and delivery mode details (including security considerations for put_url and callback_url). However, it does not mention error handling, size limits, or performance implications, which would be valuable for an agent.

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

Conciseness3/5

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

The description is front-loaded with the main purpose but includes verbose response examples and some redundancy (e.g., repeating parameter details from the schema). It could be more concise by omitting the example responses or merging the mode explanations. Still, it is structured logically.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (13 parameters, no output schema), the description covers the main modes, modifiers, and delivery options, but it lacks explicit error scenarios, constraints (e.g., maximum image size), and a structured description of the return value beyond content type examples. It is adequate but leaves gaps an agent might need to discover through trial and error.

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 92%, so the baseline is 3. The description adds context about the two modes and the default gravity, but the schema already provides detailed descriptions for most parameters. The description does not introduce meaning beyond what the schema offers, so a score of 3 is appropriate.

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's purpose: 'Resize an image' and distinguishes two modes (scale by factor or fill exact box). It uses specific verbs like 'scale', 'fill', and 'smart-crop', and the sibling tools (e.g., crop_image, compress_image) are clearly different operations, so an agent can easily understand what this tool does.

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 explains when to use the internal scale vs. fill modes and that they are mutually exclusive, but it does not provide any guidance on when to choose resize_image over sibling tools like compress_image or convert_image. An agent would need to infer the context from the tool names alone.

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

A3.9/5.0
Disambiguation3/5

Most tools are distinct, but compress_image, convert_image, and optimize_generated_image overlap heavily: all re-encode images with format and quality options. The descriptions clarify intent, yet an agent could still struggle to pick between compressing, converting, and optimizing in some cases.

Naming Consistency4/5

The set mostly follows a verb_noun pattern (analyze_image, compress_image, crop_image, resize_image). Minor deviations include image_pipeline, which is a noun phrase, and optimize_for_vision/optimize_generated_image, which use longer prepositional forms, but the overall pattern is predictable.

Tool Count5/5

Ten tools is well within the ideal range for an image-processing server. Each tool serves a meaningful purpose, and the count feels neither bloated nor thin.

Completeness4/5

Core image operations are well covered: analyze, resize, crop, convert, compress, pipeline, plus cost/format introspection. Minor gaps like rotate/flip or explicit metadata editing are absent, but agents can accomplish most workflows with the existing surface.

Resources