Skip to main content
Glama

Image Resize API - width, height or percent

image_resize
Read-onlyIdempotent

Resize 1-30 images by width, height (aspect kept) or percent, Lanczos quality; exact=true stretches to width x height. GPS/EXIF removed. Runs on our server, files are deleted right after the call, nothing stored. Free: 5 calls/day per IP. Paid: Radar API key (from €9/mo at https://radarbg.com/pricing#starter via X-API-Key) or $0.003/call via x402 at https://radarbg.com/x402/image-resize.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "width": 60,
      "fileName": "sample.png",
      "fileContent": "iVBORw0KGgoAAAANSUhEUgAAAHgAAABQCAIAAABd+SbeAAAA6klEQVR4nO3cQQ2DABAAwdKgg1cFVQIykIOEyqiIisFDKdsQZv6XXDb3vmFa3jeOd//3AlchdEToiNARoSNCR4SOCB0ROiJ0ROiI0BGhI0JHhI4IHRE6InRE6Mi4Z/jznH+0xmk8Xut3gy46InRE6IjQEaEjQkeEjggdEToidEToiNARoSNCR4SOCB0ROiJ0ROiI0BGhI0JHhI4IHRE6InRE6IjQEaEjQkeEjggdEToidEToiNARoSNCR4SOCB0ZPIFtuOiI0BGhI0JHhI4IHRE6InRE6IjQEaEjQkeEjggdEToidEToiNCRDexBBl0OjJSaAAAAAElFTkSuQmCC"
    },
    "name": "image_resize"
  }
}

Input Schema

NameRequiredDescriptionDefault
exactNoUse exactly width x height
filesNoOr several files: [{fileName, fileContent (base64)}]
widthNoWidth in px (max 10000)
heightNoHeight in px (max 10000)
percentNoOr scale in percent (1-400)
fileNameNoFile name with extension, e.g. report.pdf
fileContentNoThe file as base64 (a data: URI is fine)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / height / minimum
      Added value: +0
    • addedInput schema / properties / percent / minimum
      Added value: +0
    • addedInput schema / properties / width / minimum
      Added value: +0
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

With only readOnly/idempotent/openWorld annotations supplied, the description carries real behavioral weight: Lanczos resampling quality, automatic EXIF/GPS stripping, server-side processing with files deleted immediately and nothing stored, and a 5-calls-per-day-per-IP free limit. The no-storage claim is consistent with readOnlyHint=true and idempotentHint=true, so there is no contradiction.

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 core capability and sizing modes lead the sentence, followed by side effects, then access/pricing. Every clause adds distinct information (quality, privacy, quota, auth); the URLs are long but functional rather than padding.

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 7-parameter, no-required-parameter tool with no output schema, the definition covers modes, limits, privacy, and authentication well. The notable gap is the return value: it does not say whether the response contains base64 image data or URLs, which matters because no output schema exists to answer that.

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 100%, so a baseline of 3 would be acceptable, but the description adds interaction semantics the schema does not: height preserves aspect ratio while exact=true overrides it by stretching. It also caps the files array at 30 entries, which the schema leaves unbounded. Per-parameter types and maxima remain schema-only, hence 4 rather than 5.

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?

States a specific verb and resource ('Resize 1-30 images') plus the three mutually exclusive sizing modes (width, height with aspect kept, percent) and the exact=true override. This clearly separates it from related tools such as image_crop (which cuts rather than scales) and social_image_resizer.

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 gives conditional guidance for choosing a mode: use height when aspect must be preserved, exact=true to stretch to width x height, percent for proportional scaling. It also states the batch cap (1-30 images) and the access paths (free tier, API key, x402). It never explicitly names a sibling alternative or a when-not-to-use case, so it stops short of 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.

Resources