Skip to main content
Glama

crop_sprite

Crops the canvas to a specified rectangle across all layers and frames, keeping only the chosen area. Use it to trim sprite bounds consistently.

Instructions

Crop the canvas to rect in every layer and frame; rect must overlap the canvas.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>",
      "rect": "<rect>"
    },
    "name": "crop_sprite"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesSprite file. Relative paths resolve against the server root.
rectYesArea to keep, in canvas pixels

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries full burden; it does disclose the non-obvious cross-cutting behavior that the crop hits every layer and frame, plus the overlap validation rule. It says nothing about irreversibility, undo, or effect on cel offsets/out-of-bounds pixels, which matters for a destructive-looking edit.

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?

One sentence, front-loaded with the action and resource, with the validation constraint appended after a semicolon. No filler or restatement of the tool name.

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?

An output schema exists and both parameters are fully described, so the remaining gap is behavioral, not structural. The description covers scope and validation but omits whether the operation is reversible or what happens to content outside the rect, a modest gap for a two-parameter mutation tool.

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 real semantics: it constrains rect against the canvas (must overlap) and clarifies that cropping happens in canvas coordinates for all layers/frames. This sharpens the Rect definition, which otherwise allows negative x/y without saying why.

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 ('Crop') and resource ('the canvas'), and adds scope the name alone doesn't convey: applied to 'every layer and frame'. This is clearly distinct from a canvas-resize operation, though it never names resize_sprite as the contrasting sibling.

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?

Provides a concrete precondition ('rect must overlap the canvas'), which tells the agent when the call is invalid. However, it gives no guidance on when to choose crop_sprite over resize_sprite or other canvas-modifying siblings, and no exclusions.

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