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 €15/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)}] (up to 60 files, 20 MB total)
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; 20 MB total decoded limit per call)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / fileContent / description
      Previous value: -"The file as base64 (a data: URI is fine)"New value: +"The file as base64 (a data: URI is fine; 20 MB total decoded limit per call)"
    • changedInput schema / properties / files / description
      Previous value: -"Or several files: [{fileName, fileContent (base64)}]"New value: +"Or several files: [{fileName, fileContent (base64)}] (up to 60 files, 20 MB total)"
    • addedInput schema / properties / files / maxItems
      Added value: +60
  2. 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
  3. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Despite annotations already covering safety, the description adds substantive behavior: GPS/EXIF metadata is stripped, processing happens server-side, files are deleted immediately and nothing is stored. It also discloses rate limiting and authentication requirements, which are exactly the operational facts the annotations cannot express.

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 core resize behavior is front-loaded in the first clause, followed by quality, privacy, and pricing details in order of decreasing importance. It is dense but every sentence carries information, with only the pricing URLs adding minor bulk.

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?

With no output schema, the description should say what comes back (resized image inline as base64, a URL, or a job reference), and it only implies this via "files are deleted right after the call". Privacy, auth, and limits are well covered, but the response shape is left to guesswork.

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 coverage is 100%, so the baseline is 3; the description does add the important "aspect kept" nuance for width/height and the stretching semantics of exact. However, it states "1-30 images" while the schema allows up to 60 files, an inconsistency that muddies rather than clarifies the batching parameter.

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?

"Resize 1-30 images by width, height (aspect kept) or percent" states a specific verb, resource, and the three supported modes in one clause. This clearly separates it from siblings like image_convert or image_crop, which change format or cut pixels rather than scale.

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 explains how to choose a mode: width/height preserves aspect, exact=true stretches, percent scales, which is real selection guidance for the main decision an agent faces. It also gives the practical conditions of use (free tier of 5 calls/day, or a Radar API key / x402 payment), but never names a sibling tool or a when-not-to-use case.

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