Skip to main content
Glama

Apply filters

filter

Apply chained image effects such as blur, color, lighting, shadow, and distortion to a layer or selection, with optional opacity blending to the original.

Instructions

Apply one or more filters in sequence to a layer (confined to the selection if any; opacity < 1 blends with the original). Filters & params:

  • blur: radius (px, gaussian sigma, default 4)

  • motion_blur: angle (deg), distance (px, default 20)

  • zoom_blur: cx, cy (doc px, default region center), amount (0..1, default 0.15)

  • sharpen: amount (default 0.8), radius (default 1.5)

  • noise: amount (0..1, default 0.1), mono (bool, default true), seed

  • hue_saturation: hue (deg shift), saturation (-100..100), lightness (-100..100)

  • brightness_contrast: brightness (-100..100), contrast (-100..100)

  • exposure: ev (stops, e.g. 0.5 or -0.7), gamma (default 1)

  • levels: inBlack (0), inWhite (255), gamma (1), outBlack (0), outWhite (255)

  • curves: points [[in,out],...] 0-255 (monotone spline), channel: rgb|r|g|b

  • color_balance: shadows/midtones/highlights: [r,g,b] each -100..100 (cyan-red, magenta-green, yellow-blue)

  • colorize: hue (deg), saturation (0..100, default 50), lightness (-100..100)

  • color_overlay: color, opacity (0..1), blend (normal, multiply, screen, overlay, color, soft-light...)

  • vibrance: amount (-100..100)

  • invert: -

  • grayscale: -

  • sepia: amount (0..1, default 1)

  • posterize: levels (2..32, default 5)

  • threshold: level (0..255, default 128), colors? [dark, light]

  • gradient_map: stops: ["#000", "#f80", "#fff"] mapped from shadows to highlights

  • pixelate: size (px, default 8)

  • glow: radius (default 12), intensity (default 1), threshold (0..255 luminance, default 0 = everything glows), color (optional tint), mode: halo (default: glow around, subject unchanged) | add (additive bloom over the subject; alias type "bloom")

  • drop_shadow: dx, dy (default 6), blur (default 8), color (default #000), opacity (default 0.5)

  • outline: width (px, default 3), color (default #000), opacity (default 1)

  • warp: mode: wave|ripple|twirl|pinch|bulge|noise; amplitude (px), wavelength (px), angle, cx, cy, radius, strength, seed

  • kuwahara: radius (default 4) — painterly smoothing (alias oil_paint)

  • vignette: strength (0..1, default 0.5), radius (0..1, default 0.75 of half-diagonal), color (default #000)

  • chromatic_aberration: amount (px, default 4), angle (deg)

  • emboss: angle (deg, default 135), strength (default 1), mix (0..1 blend with original, default 1)

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": {
      "filters": "<filters>"
    },
    "name": "filter"
  }
}

Input Schema

NameRequiredDescriptionDefault
edgeNoEdge handling for blurs (auto: extend if the layer is opaque at the borders)
layerNoLayer id, name, or index (0 = bottom, -1 = top). Default: the active layer.
targetNo
filtersYese.g. [{type:"blur", radius:6}, {type:"hue_saturation", saturation:20}]
opacityNoBlend result with original (0..1, default 1)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It does disclose meaningful traits — sequential application order, selection confinement, opacity blending semantics, per-filter defaults, and aliases (bloom, oil_paint) — but says nothing about whether the operation is destructive, undoable, or what happens on an invalid filter type. For a mutation tool with zero annotation coverage, that is a real gap.

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 core behavior is front-loaded in one sentence, followed by a scannable bulleted reference. It is long, but the length is driven by 29 filter types whose options are otherwise undocumented; a few entries (e.g. the parenthetical alias notes) could be tightened without loss.

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 high-complexity, no-output-schema tool, the description covers the hard part — the filter catalog and its parameters — thoroughly. It omits the `target` (layer vs mask) option and return/undo behavior, but nothing critical to invoking the tool correctly is missing.

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 80% at the top level, but the nested filter objects expose only a `type` enum with `additionalProperties: {}`, so the schema documents none of the per-filter settings. The description fills exactly that hole, giving names, units, ranges, and defaults for every filter's parameters (radius, angle/distance, ev, points, blend modes, etc.), which is the information an agent needs to actually construct a call.

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 opening sentence states a specific verb and resource — 'Apply one or more filters in sequence to a layer' — and the enumeration of 29 filter types makes it unmistakable against siblings like fill, stroke, or shape. Scope modifiers (confined to selection, blends with original when opacity < 1) sharpen what the operation actually does.

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?

Usage is only implied: the description says filters apply in sequence and are confined to the selection, but never states when to reach for this tool versus fill, transform_layer, or run_script, nor any prerequisites such as needing an active raster layer. An agent can infer the context but gets no explicit routing or exclusions.

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