Skip to main content
Glama

apply_convolution

Apply blur, sharpen, edge-detection, or other convolution matrices to an Aseprite layer to filter pixels, with optional frame range and region.

Instructions

Run one of Aseprite's convolution matrices (blur, sharpen, edges...) on a layer.

Alpha is filtered too, except on a background layer, which stays opaque. Indexed pixels are filtered through their palette colours and get the nearest entry. A cel left fully transparent is removed, so a later op on that frame in the same batch finds no cel. Every requested frame must have a cel; linked cels are handled like adjust_colors.

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>",
      "matrix": "<matrix>"
    },
    "name": "apply_convolution"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesSprite file. Relative paths resolve against the server root.
layerYesLayer name, or a 'group/child' path for nested layers
framesNoFrames: a number, "1-4", "1-4,7" or "all" (1-based)
matrixYesWhich convolution matrix to run
regionNoOnly change pixels inside this canvas rectangle; default the whole cel

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/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 behavioral burden and does so richly: it discloses that alpha is filtered (except on opaque background layers), how indexed pixels map to the nearest palette entry, that fully transparent cels are removed (affecting later ops in a batch), and that every requested frame must already have a cel. It stops short of covering undo/reversibility or explicit error behavior, keeping it below 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?

The primary action is front-loaded in the first sentence, followed by compact behavioral notes. Each sentence carries distinct information (alpha, indexed pixels, cel removal, cel prerequisite, linked cels), with 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?

An output schema exists and parameter coverage is complete, so the description needn't explain return values. It covers the key side effects and prerequisites well; only edge-case behavior such as undo semantics or explicit error signaling on a missing cel is left implicit.

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 100%, so the schema already documents path, layer, frames, matrix, and region. The description adds only the matrix category examples (blur, sharpen, edges) and the batch/frame context, which is marginal beyond the enum and per-param descriptions.

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 description opens with a specific verb and resource: 'Run one of Aseprite's convolution matrices (blur, sharpen, edges...) on a layer.' The parenthetical examples and the target ('on a layer') make it immediately distinguishable from drawing siblings like draw_rect or color tools like adjust_colors.

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?

The description establishes the operation as an effect/filter applied to a layer, so the intended use is implied. However, it never states when to prefer this tool over siblings (e.g., adjust_colors) or when not to use it; the reference to adjust_colors is only about linked-cel handling, not routing.

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