Skip to main content
Glama

image-resize-convert-compress-watermark

Crop an image

image_crop

Call this tool to cut a rectangle out of an image. x, y are the top-left corner in pixels from the image's top-left. A rectangle past an edge is refused with the image's real size, not clamped. Free: sources up to 4 MP.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYesLeft edge of the crop, in pixels from the left of the image
yYesTop edge of the crop, in pixels from the top of the image
pathYesName of an image uploaded with image_upload, or one this server wrote earlier
widthYesWidth of the crop in pixels
heightYesHeight of the crop in pixels
out_pathYesName for the file to write; it comes back as a download link valid for one hour. The extension decides the output format; without a known one the input's format is kept
overwriteNoReplace out_path if it already exists. Default false. Never allows an output to be one of the inputs

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

With annotations all false, the description adds meaningful behavioral context: out-of-bounds rectangles are refused with the real image size rather than clamped, and there is a 4 MP limit for free sources. These are exactly the non-obvious runtime behaviors an agent needs.

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?

Three short sentences with no filler: purpose, coordinate semantics, edge-case behavior, and a usage limit. Every sentence contributes information an agent needs before calling.

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 mutation-like tool with no output schema, the description plus fully documented schema covers the required inputs, coordinate system, error behavior, and a key size limit. It does not explicitly describe the shape of the result, but out_path's schema description already covers the download link, so nothing critical is missing.

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 the baseline is 3, but the description adds useful semantics by defining (x, y) together as the top-left corner and explaining how out-of-bounds rectangles are handled. It complements rather than repeats the schema definitions.

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 uses a specific verb and object – 'cut a rectangle out of an image' – which is unambiguous and naturally distinct from sibling tools like image_resize, image_thumbnails, or image_convert. Even without naming a sibling, the action of cropping is precisely identified.

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?

It explicitly frames the tool as the action to take when a rectangular crop is needed ('Call this tool to cut a rectangle...'). It does not name alternatives or state when not to use it, so it stops short of a full 5, but the usage trigger is clear.

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.