Skip to main content
Glama

crop_sprite

Destructive

Crop an Aseprite sprite canvas to a specified rectangle using x, y, width, and height; a larger rectangle expands the canvas and fills new background areas.

Instructions

Crop the canvas to the rectangle (x, y, width, height).

The resulting canvas is subject to the same dimension/area caps as `create_sprite`
(a "crop" to a larger rectangle grows the canvas). Where it grows a Background, the new
area is black, or the transparent palette index on an indexed sprite.

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": {
      "filename": "<filename>",
      "x": "<x>",
      "y": "<y>",
      "width": "<width>",
      "height": "<height>"
    },
    "name": "crop_sprite"
  }
}

Input Schema

NameRequiredDescriptionDefault
xYes
yYes
widthYes
heightYes
filenameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.10.0
    • removedInput schema / properties / filename / title
      Removed value: -"Filename"
    • removedInput schema / properties / height / title
      Removed value: -"Height"
    • removedInput schema / properties / width / title
      Removed value: -"Width"
    • removedInput schema / properties / x / title
      Removed value: -"X"
    • removedInput schema / properties / y / title
      Removed value: -"Y"
    • removedInput schema / title
      Removed value: -"crop_spriteArguments"
  2. First observedv0.7.0

TDQS

B3.2/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, but the description adds genuinely non-obvious behavior: a crop to a larger rectangle grows the canvas, it is bound by the same dimension/area caps as create_sprite, and grown Background area is filled black or with the transparent palette index. It does not state whether the source file is modified in place or where the result goes.

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?

Two short sentences, front-loaded with the core action and followed by the cap/fill caveats. The parenthetical about growing on crop is dense but earns its place; nothing is padding.

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?

For a destructive, five-parameter mutation with no output schema, the description covers the surprising edge cases (growth, caps, fill color) well but leaves the core mutation contract undefined: which file, whether it is written in place, and what the caller gets back. Adequate but with clear gaps given the tool's complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and none of the five parameters is described in the schema, so the description carries the full burden. It implies the meaning of x, y, width, height via the rectangle wording, but never defines the coordinate origin, units, or negative/oversized values, and the required 'filename' parameter is never mentioned at all.

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 opens with a specific verb+resource: 'Crop the canvas to the rectangle (x, y, width, height)', which is precise enough to distinguish it from resize-style siblings. It stops short of naming which sibling to prefer for adjacent operations (e.g. trim or scale), so differentiation is implicit.

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 explicit when-to-use or when-not-to-use guidance, and no named alternative such as trim_sprite or scale_sprite. The only routing hint is a reference to create_sprite for cap semantics, which is about limits rather than tool choice.

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

Deploy Server

Other Tools