Skip to main content
Glama

document_autocrop

Crop away empty borders by trimming images to non-empty content, with an optional layer as the reference region.

Instructions

Autocrop the image to non-empty content, optionally using a specific layer as the reference drawable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
layer_idNo
session_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It implies a destructive mutation of the document canvas but does not say whether the crop is undoable, whether it affects only the current layer or the whole document, or what permissions/session state are required. Only the minimum (what the operation does) is disclosed.

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?

A single well-formed sentence with the core action front-loaded and the optional modifier trailing. No wasted words, though it is arguably too terse for a mutation tool.

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

Completeness3/5

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

The output schema exists so return values need not be described, and the core action is conveyed. However, for a document-mutating tool with zero annotations and zero schema descriptions, the definition omits session_id semantics and any reversibility or scope information, leaving noticeable gaps.

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 0%, so the description must compensate. It does add real meaning for layer_id by explaining it acts as the 'reference drawable' for the autocrop bounds, but session_id is left entirely unexplained (presumably the target document session). Partial compensation for a two-parameter tool.

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 (autocrop) and resource (the image/document), and clarifies the operation targets non-empty content rather than a manual region. It is clear on its own but never references the closely related sibling document_crop, leaving the agent to infer the distinction between automatic and manual cropping.

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?

There is no guidance on when to choose autocrop versus document_crop, document_scale, or document_resize, all of which appear in the sibling list. The 'optionally using a specific layer' clause hints at a mode but does not state when that mode is warranted.

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