Skip to main content
Glama

Crop an image

crop_image
Read-onlyIdempotent

Crop an image to a pixel box or a 0 to 1 ratio box. circle cuts a round mask. format is png, jpeg, or webp. 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": "crop_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
xNo
yNo
fileYesThe image. Provide url or data.
unitNopx is source pixels. ratio is a 0 to 1 share of the source.px
widthNo
circleNo
formatNopng
heightNo

Output Schema

NameRequiredDescriptionDefault
dataYesCropped 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.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, and openWorld, so the description's job is to add operational detail — and it does: private/local addresses are refused, decoded input is capped at 10 MB, and the result is returned as base64. These are real constraints an agent must know before calling. Only the phrasing about the circle mask is imprecise ("circle cuts a round mask").

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?

Roughly five short sentences, front-loaded with the core operation and then layering constraints; almost no waste. The telegraphic style ("circle cuts a round mask") trades a little readability for density, but nothing is 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 moderate-complexity single-image transform with an output schema, the description covers input channels, size cap, SSRF-style address refusal, output format, and return encoding. The remaining gap is the semantics of the box geometry parameters, which is the one thing an agent could plausibly get wrong.

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 only 25% across 8 parameters, so the description must carry weight; it explains the unit modes, the circle flag, the format enum, and the url/data input choice. However, the geometry parameters (x, y, width, height) are left entirely unexplained — no statement that x/y is the box origin, no note that width/height default to 1, and no guidance on out-of-bounds boxes. That gap keeps it at a mid score.

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?

The first sentence pairs a specific verb (crop) with the resource (image) and names the two coordinate modes (pixel box vs 0-1 ratio box), which separates it from sibling operations like resize_image or compress_image. It stops short of explicitly naming an alternative tool, but the operation is unmistakable.

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 conveys how to use the tool (choose px or ratio units, optional circle mask, output format, input via base64 or URL) but never states when to prefer it over resize_image or convert_image, nor any when-not conditions. Usage is implied by the mode descriptions rather than guided.

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.