Skip to main content
Glama

Crop image

crop_image

Crop an image to a specific pixel box or centered aspect ratio, then save in your preferred format and quality.

Instructions

Crop to a pixel box (left, top, width, height) or to a centered aspect ratio such as 1:1, 4:5 or 16:9.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topNo
leftNo
inputYes
widthNo
aspectNoCentered crop to this ratio, e.g. 16:9. Overrides the pixel box.
formatNo
heightNo
outputNoOutput file path. Default: next to the input, with a suffix and the right extension.
previewNoAttach a small JPEG preview to the result (default true).
qualityNoLossy quality 1-100 (default 80). Ignored for png.
backgroundNoCSS color used to flatten transparency when the output is jpeg (default #ffffff).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden but only describes crop geometry. It does not disclose whether a new output file is created, whether the original is preserved, or that aspect overrides the pixel box (though the schema notes this). The use of 'or' leaves the interaction between the two modes ambiguous.

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?

A single, front-loaded sentence with no wasted words. Every element—pixel box, centered aspect ratio, ratio examples—earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 11 parameters, no annotations, and no output schema, this description is too thin. It omits behavioral details such as output file creation, default format/quality effects, and how format/background interact with cropping. It is minimally adequate for crop geometry but incomplete for safe and correct invocation.

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?

The description adds meaning to left/top/width/height by grouping them as a 'pixel box' and to aspect as a 'centered aspect ratio' with examples. With only 45% schema description coverage, this helps, but it does not compensate for undocumented parameters like format or input, nor clarify how aspect interacts with the pixel box.

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 description states a specific verb and resource ('Crop to a pixel box... or to a centered aspect ratio...') and clearly explains the two crop modes. It implicitly distinguishes itself from circle_crop by focusing on rectangular/pixel-box cropping, though it does not name any sibling tool.

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 intended use is implied: choose this tool when a rectangular or aspect-ratio crop is needed. However, it gives no explicit guidance on when to prefer it over circle_crop, resize_image, or compress_image, leaving tool selection to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.