Skip to main content
Glama

crop_image

Trim pixels from an image's edges in place by specifying amounts per side. All-zero amounts leave the image unchanged; cropping removes its astrometric solution.

Instructions

Crop pixels off the edges of an image, in place. Amounts are pixels to remove from each side. All four amounts 0 (or omitted) runs nothing and leaves the image, and its astrometric solution, unchanged. Crop runs with noGUIMessages, so PixInsight writes its warnings to the Process Console instead of opening a confirmation dialog. A crop deletes the image's astrometric solution (PixInsight behaviour); the result says when one was removed.

Input Schema

NameRequiredDescriptionDefault
topNoPixels to remove from the top edge
leftNoPixels to remove from the left edge
rightNoPixels to remove from the right edge
bottomNoPixels to remove from the bottom edge
view_idYesView ID to crop

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: it discloses in-place mutation, the noGUIMessages behavior routing warnings to the Process Console, and the destructive side effect of deleting the astrometric solution. It stops short of stating limits (e.g., cropping past image bounds) or auth/permission needs, so not a 5.

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?

Four sentences, each carrying distinct payload, with the core operation front-loaded before the side-effect details. Slightly dense but no filler.

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 mutation tool with no annotations and no output schema, the description covers the important behaviors (in-place edit, astrometric-solution loss, no-op case) and hints at the result reporting a removed solution. Missing only edge-case limits and failure conditions.

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%, giving a baseline of 3, and the description adds real meaning: it clarifies the amounts are pixels removed per side and that the zero/omitted default across all four amounts produces no change. This relational/edge-case semantics goes beyond the per-field schema text.

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 (image edges), plus the scope constraint 'in place.' An agent can distinguish it from siblings like resample_image or reproject_to_reference without opening any schema.

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?

It describes the no-op case (all amounts 0 or omitted leaves the image unchanged), which is useful behavioral guidance, but never names an alternative tool or states when to prefer this over resampling/reprojecting. Usage context is only implied.

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