Skip to main content
Glama

crop

Destructive

Crop the canvas to an explicit rectangle (left, top, width, height in photo pixels). This is not a scale (use resize). IRREVERSIBLE in this session: there is no undo, so make a checkpoint first when in doubt. Every live filter, mask channel and the filter record survive a crop; it is the one geometry change that never refuses because of masked filters.

Input Schema

NameRequiredDescriptionDefault
topYesTop edge of the new canvas, in document pixels.
leftYesLeft edge of the new canvas, in document pixels.
imageYesImage id, as returned by open_photo.
widthYesNew canvas width, in pixels.
heightYesNew canvas height, in pixels.

Output Schema

NameRequiredDescriptionDefault
widthNo
heightNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and idempotentHint=false, but the description goes well beyond them: it declares there is no undo in this session, prescribes checkpointing first, and explains that live filters, mask channels and the filter record survive the crop. The note that this is 'the one geometry change that never refuses because of masked filters' is distinctive behavioral context an agent cannot get from structured fields.

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?

Four tightly packed sentences, each front-loaded with its key fact: what to crop, what it is not, that it is irreversible, and what it preserves. No filler.

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

Completeness5/5

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

The tool has an output schema, so return values need not be described, and the mutations' side effects are fully covered. Given the destructive annotation, the coverage of irreversibility, preservation semantics and the checkpoint recommendation makes the definition complete for 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?

Schema description coverage is 100%, so all five parameters are already documented with their units and the width/height minimum of 1. The description only clarifies that the values are in photo pixels (schema says document pixels), which is a marginal addition. Baseline 3 is appropriate when the schema does the heavy lifting.

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?

States a specific verb (crop) and resource (canvas) and enumerates the exact geometry parameters, distinguishing it from scaling: 'This is not a scale (use `resize`)'. An agent can tell this apart from `resize` and `crop_for_platform` without opening the schema.

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

Usage Guidelines5/5

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

Names the alternative explicitly ('use `resize`') and gives a concrete when-to-use rule ('make a `checkpoint` first when in doubt'). Both the excluded case and the recommended preceding action are spelled out, leaving nothing to inference.

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