Skip to main content
Glama

move_region

Moves or copies a rectangular block of pixels within an Aseprite sprite by a given offset, optionally placing it on another layer or frame and clipping off-canvas pixels.

Instructions

Move (or with copy, duplicate) the pixels of a layer inside rect by (dx, dy).

rect is in canvas coordinates and is clipped to the canvas first; outside its cel the layer counts as transparent. The source area is cleared unless copy is true, then the block is drawn at the destination, so overlapping moves work. Pixels whose destination is off the canvas are dropped and counted in clipped. With target_layer or target_frame the block lands there (the cel is created or grown as needed). Indexed and grayscale pixel values are copied as they are. A background layer stays opaque: its cleared source turns black and a block from another layer is blended onto it. Linked cels get their own copy first, so other frames never change.

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>",
      "layer": "<layer>",
      "rect": "<rect>",
      "dx": "<dx>",
      "dy": "<dy>"
    },
    "name": "move_region"
  }
}

Input Schema

NameRequiredDescriptionDefault
dxYesPixels to move by; negative goes left or up
dyYesPixels to move by; negative goes left or up
copyNoLeave the source pixels where they are
pathYesSprite file. Relative paths resolve against the server root.
rectYesCanvas rectangle to move
blendNofalse: the moved block replaces what is under it, transparent pixels included; true: it is alpha-blended over it
frameNo1-based frame number
layerYesLayer name, or a 'group/child' path for nested layers
target_frameNoFrame to put the pixels in; default the same frame
target_layerNoLayer to put the pixels on; default the same layer

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/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 thoroughly: source clearing, dropped off-canvas pixels counted in 'clipped', target cel creation/growth, indexed/grayscale value passthrough, background-layer black-fill and blending, and linked-cel duplication so other frames never change. These are exactly the non-obvious mutation side effects an agent needs before calling.

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?

Front-loaded with the core action, then consequences in roughly priority order, with no filler sentences. It is a dense prose block rather than a structured list, which makes the blended/linked-cel caveats easy to skim past, but every sentence carries distinct information.

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 10-parameter mutation tool with an output schema (which covers the 'clipped' count), the description explains the risky behaviors and the target-redirection semantics well. The gap is two parameters (blend, frame) whose effects are only partially or not at all described.

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 baseline is 3, but the description adds real meaning beyond the schema: it explains what copy actually does to the source, why target_layer/target_frame exist (cel created or grown), and how rect clipping interacts with the layer. It does not explain the blend or frame parameters, so it is above baseline but not exhaustive.

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?

The first sentence gives a precise verb (move/duplicate), the resource (pixels of a layer inside rect), the offset (dx, dy), and the copy variant in one line. The scope detail (canvas coordinates, clipped to canvas, outside cel transparent) separates it cleanly from drawing or erasing siblings without needing to name them.

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

Usage Guidelines4/5

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

It states the conditions that select each mode: copy=true leaves the source in place, target_layer/target_frame redirect the block, and overlapping moves work because the block is drawn at the destination. No sibling tool is named as an alternative for 'move whole layer' vs 'move pixels', so the routing guidance stops short of a 5.

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