Skip to main content
Glama

paint_filter

Apply blur, channel-shift, noise, relief, levels, threshold, invert, and hue/saturation filters to a selected raster layer while honoring alpha lock and selection bounds.

Instructions

Filter a raster layer within the selection, honouring alpha lock (with alpha_lock a blur stays inside the shape). blur: premultiplied Gaussian radius 0..250 (glow: duplicate layer, blur, blend screen/add; soft shadows). channel_shift: offsets {r:[dx,dy],g:[..],b:[..]} whole pixels (chromatic aberration, misregistration). noise: amount 0..1 seeded grain, monochrome or per-channel. relief: emboss lighting, amount 0..1 strength, radius softness, angle = light direction (135 = upper left), source luminance (brushwork, impasto) or alpha (cut paper, foil), depth 0.1..50 multiplies slopes (4..20 for gentle painted height maps). levels: black/white input points 0..255 and gamma (>1 lightens midtones). threshold: level 0..255, black-and-white by luminance (photocopy, stencil). invert: colour negative. hue_saturation: hue degrees, saturation factor 0..4, lightness -1..1. Colour filters keep alpha. For the whole picture use paint_layer(stamp_visible) first.

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": {
      "kind": "<kind>"
    },
    "name": "paint_filter"
  }
}

Input Schema

NameRequiredDescriptionDefault
hueNo
kindYes
seedNo
angleNo
blackNo
depthNo
gammaNo
levelNo
whiteNo
amountNo
radiusNo
sourceNoluminance
offsetsNo
layer_idNoTarget layer id or unique layer name; the active layer stays unchanged. Default: active layer
lightnessNo
monochromeNo
saturationNo
document_idNoTarget this document instead of the shared active one (recommended when several agents share the server)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does substantial work: it declares alpha-lock honouring, that colour filters preserve alpha, that blur uses a premultiplied Gaussian, that noise is seeded (deterministic), and that glow is achieved by duplicating and screen/add blending. It never states plainly that the operation mutates the target layer in place, whether it is undoable, or what is returned, which keeps 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 action and its scoping constraint are front-loaded, and the remaining text is organized per filter kind so an agent can scan to the relevant clause. The telegraphic style ('radius softness', 'emboss lighting') is dense and occasionally cryptic, but almost every clause carries parameter ranges or use-case meaning rather than 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 an 18-parameter tool with no annotations and no output schema, the description covers effect semantics, parameter ranges and cross-tool routing well. The remaining gaps are mutation/undo semantics and return behavior, which matter for a destructive-looking layer operation but are less critical than the parameter documentation it already provides.

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

Parameters5/5

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

Schema coverage is only 11% across 18 parameters, so the description must compensate and largely does: it supplies ranges and meaning for radius (0..250), amount (0..1), depth (0.1..50 with a practical 4..20 band), angle (135 = upper left light direction), black/white (0..255), gamma (>1 lightens midtones), level (0..255), hue/saturation (0..4)/lightness (-1..1), the offsets shape {r:[dx,dy],g:[..],b:[..]} in whole pixels, source (luminance vs alpha), and monochrome grain. Only layer_id and document_id are left to the schema, which already describes them.

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?

Opens with a specific verb, resource and scope: 'Filter a raster layer within the selection, honouring alpha lock', then enumerates the eight supported filter kinds by name (blur, channel_shift, noise, relief, levels, threshold, invert, hue_saturation). It also names the sibling it is not for whole-image work (paint_layer with stamp_visible), so an agent can place it among the paint_* family without opening a schema.

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?

Gives one explicit routing rule — 'For the whole picture use paint_layer(stamp_visible) first' — plus per-kind use-case cues (chromatic aberration for channel_shift, photocopy/stencil for threshold, brushwork/impasto for relief). It does not state exclusions or preconditions (e.g. selection required, alpha lock state) explicitly, so it stops short of full when/when-not guidance.

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