Skip to main content
Glama

Resize an image

resize_image
Read-onlyIdempotent

Resize an image by pixels or percent. Fit is contain, cover, or stretch. Send base64 or a public URL. Private addresses are refused and the decoded file is capped at 10 MB. Returns the image as base64.

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": {
      "file": "<file>"
    },
    "name": "resize_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
fitNocontain
fileYesThe image. Provide url or data.
modeNopixels
widthNo
heightNo
percentNo
lockAspectNo

Output Schema

NameRequiredDescriptionDefault
dataYesResized image as base64.
mimeYes
bytesYes
widthYes
heightYes
filenameYes
extensionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  2. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent and open-world behavior, and the description adds genuinely new constraints: private addresses are refused, input is capped at 10 MB after decoding, and output is base64. It does not say what error surface looks like or whether failures are distinguishable from the sibling tools, but the added policy detail is well above the annotation baseline.

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?

Five short sentences, each carrying a distinct fact: sizing modes, fit values, input channels, security/size limits, and return format. It is front-loaded with the core action and wastes no words.

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?

An output schema exists and the description still usefully confirms the return is base64-encoded, and the 10 MB and private-address constraints cover the riskiest failure modes for an open-world fetch. The gaps are minor semantic ones (lockAspect, percent interaction with width/height) rather than anything that would cause a wrong call.

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 only 14%, so the description has to compensate, and it partially does: it enumerates the fit enum values and explains the url vs base64 input split. It says nothing about lockAspect, the percent default of 100, or how width/height nulls behave, so several of the seven parameters remain unexplained in both places.

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?

States a specific verb and resource ("Resize an image") plus the two supported sizing modes, which lets an agent distinguish it from compress_image or convert_image. It does not explicitly distinguish it from the nearby resize_social_image sibling, so it stops short of a 5.

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

Usage Guidelines2/5

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

The description implies usage through the mode options (pixels or percent) but never says when to choose this tool over resize_social_image or crop_image, nor any when-not conditions. The agent must infer routing from 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.