Skip to main content
Glama

add_effect

Add a non-destructive effect to a layer, or re-edit one in place with filter_id: one of vignette, black_white, motion_blur, lens_blur, add_noise, drop_shadow, outline, outer_glow, surface_blur. It is the same live, editable, maskable mechanism as add_adjustment, on the SAME filter stack: manage_filters (op=list, set_visibility, delete) manages both. type picks the effect; a field that belongs to another effect is refused, naming this type's own fields. An effect applies to ONE layer (layer_id or layer, else the selected or top layer), not to the flattened photo. A re-edit MERGES: any field you omit keeps its value. Only effects made by Editmamei can be re-edited; one made outside Editmamei is refused (delete it and re-create it). mask (a saved selection channel name) confines a NEW effect; it is fixed at creation and cannot change on a re-edit. ORDER MATTERS: straighten, flip and resize first, then crop, THEN add masked effects: rotate, flip and resize all refuse once a masked filter exists, or any filter made outside Editmamei. vignette, motion_blur and drop_shadow stay locked to the content through flip, resize and an exact 90/180/270-degree rotation (their center, angle and offset fields update automatically, and manage_filters op=list shows the new values); rotating by any OTHER angle is refused while a vignette, a motion_blur or a drop_shadow with a non-zero offset is present, rather than letting it drift out of alignment. outline, outer_glow, surface_blur, lens_blur and a zero-offset drop_shadow have no direction, so they survive any rotation. Resizing scales their pixel sizes with the photo (never below the 1 px minimum of outline width, outer_glow radius and surface_blur radius). lens_blur is a uniform soft-focus blur, not a depth-of-field falloff. outline puts a solid stroke around a layer's transparent edge (meme text, sticker cut-outs), width 1 to 50 px; outer_glow adds a soft glow around it (glowing text), spread 0 to 50 px; surface_blur smooths skin and other texture while keeping hard edges. outline and outer_glow need a layer with transparency, and attach to a text layer without rasterizing it: the text stays editable and the effect follows each edit. For a plain blur use add_adjustment type=gaussian_blur. Check the stack afterward with manage_filters (op=list).

Input Schema

NameRequiredDescriptionDefault
maskNoName of a saved selection channel, confining a NEW filter to it. Only valid when creating (no filter_id) — a filter's mask is fixed at creation. ORDER MATTERS: straighten / flip / resize the canvas first (transform_image, resize), then crop, THEN add masked effects — rotate, flip, and resize all refuse outright once any masked filter exists on the image, or any filter not created by Editmamei, since they cannot keep a mask aligned through those transforms. Cropping afterward is always safe.
nameNoLabel for a new filter, e.g. "Corner darken". Made unique automatically.
seedNoadd_noise only. RNG seed — the same seed reproduces the identical noise pattern (useful for an exact re-edit round trip). Default (when creating): 0.
typeYesWhich effect to create/re-edit — see the per-field descriptions below for which fields apply to which effect.
alphaNoadd_noise only. Noise added to the alpha channel too. Default (when creating): 0.
angleNomotion_blur only. Direction of the streak, in degrees: 0 is horizontal, positive angles rotate clockwise (90 is vertical). Default (when creating): 0.
colorNooutline and outer_glow only. "#rrggbb" hex. Default (when creating): "#000000" for outline, "#ffffff" for outer_glow.
gammaNovignette only. Falloff curve shape: lower spreads the darkening further in toward the centre and deepens it; higher confines it to the corners and weakens it. Default (when creating): 2.0.
imageYesImage id, as returned by open_photo.
layerNoLayer name. Defaults to the selected layer, or the topmost layer if none is selected. The filter applies to that ONE layer, not to the flattened image, so on a multi-layer document name the layer you mean. A layer inside a layer group can be named directly.
widthNooutline only. Stroke thickness in pixels at full resolution, 1..50. Default (when creating): 4. SPATIAL. The stroke grows outward from the layer's alpha edge (round corners) and the layer's own pixels are untouched.
lengthNomotion_blur only. Blur length in pixels at full resolution, 0..1000. Default (when creating): 10. SPATIAL (scaled on the proxy preview, see overview).
radiusNovignette: size of the untouched centre, 0..3, relative to the LAYER (not absolute pixels — the same value looks visually equivalent at any resolution, and consistent with center_x/center_y below). SMALLER is STRONGER. Default (when creating): 2.0, a subtle vignette (corners about a quarter darker, centre untouched). At the default softness and gamma, 1.5 is strong (corners more than half darker) and 1.2 or less turns the corners black. lens_blur: blur radius in pixels at full resolution, 0..150 (default 25 when creating) — capped much lower than the other two effects here (measured live: expensive at full resolution). drop_shadow: blur radius in pixels at full resolution, 0..1500 (default 10 when creating), clipped to the layer bounds rather than growing it. outer_glow: glow blur in pixels, 1..250 (default 20 when creating). surface_blur: smoothing radius in pixels, 1..6 (default 4 when creating) — capped low because its cost grows with the square of the radius (a 24 MP export takes ~17 s at 6). lens_blur, drop_shadow, outer_glow and surface_blur are SPATIAL (radius-scaled on the proxy preview, see overview). The precise range is enforced for whichever `type` you gave.
spreadNoouter_glow only. Pixels the glow's solid core grows past the alpha edge before it blurs, 0..50. Default (when creating): 4. SPATIAL.
opacityNodrop_shadow: default (when creating) 0.5. The shadow color is black and not configurable yet. outer_glow: default 0.75 (its color is the `color` field).
center_xNovignette only. Vignette center, as a fraction of the LAYER's own width (not the whole canvas — 0 = left edge, 1 = right edge). Default (when creating): 0.5. Cropping re-centres the vignette on the new, smaller frame (the same fraction now means a different point) — the intended behaviour, like a post-crop vignette in Lightroom, not something to correct for.
center_yNovignette only. Vignette center, as a fraction of the LAYER's own height (not the whole canvas — 0 = top edge, 1 = bottom edge). Default (when creating): 0.5. The vignette color is black and not configurable yet.
layer_idNoLayer id, as inspect (and any tool that creates a layer) reports it. Takes priority over `layer`, and is the only way to address one of two layers that share a name.
offset_xNodrop_shadow only. Horizontal shadow offset in pixels at full resolution. Default (when creating): 20. SPATIAL (scaled on the proxy preview, see overview). Only meaningful on a layer with an alpha channel — a shadow is cast from what is transparent around the opaque content.
offset_yNodrop_shadow only. Vertical shadow offset in pixels at full resolution. Default (when creating): 20. SPATIAL (scaled on the proxy preview, see overview).
softnessNovignette only. How gradual the falloff is; 0 is a hard edge. Default (when creating): 1.0.
filter_idNoRe-edit this existing filter IN PLACE instead of adding a new one (must match `type`'s operation). Any per-effect field you omit keeps the value it already had — this is a MERGE, not a reset. The values manage_filters op=list reports for it are in these same field names and units, so they can be passed straight back. The mask is fixed at creation and cannot change on a re-edit. Only filters Editmamei created can be re-edited (manage_filters op=list shows source: "editmamei"); re-editing any other filter (for example one added outside Connect) is refused, because its current values cannot be read back exactly — delete it and re-create it instead. A re-edit keeps the filter on its own layer; `layer` and `layer_id` are ignored.
red_weightNoblack_white only. How much the red channel contributes to the resulting gray. Default (when creating): 0.333.
blue_weightNoblack_white only. Default (when creating): 0.333.
green_weightNoblack_white only. Default (when creating): 0.333.
noise_amountNoadd_noise only. THE amount control — sets red/green/blue uniformly (grayscale-leaning noise, not a color-tinted one). Default (when creating): 0.2.
highlight_factorNolens_blur only. Boosts bright out-of-focus highlights (bokeh) above this threshold. Default (when creating): 0 (no boost). lens_blur applies uniformly across the whole layer (a soft-focus effect), not a depth-of-field falloff — mask it (see `mask`) to confine it to part of the image instead.
edge_preservationNosurface_blur only. How much edge contrast survives, 0..1: LOWER smooths harder (near 0 starts to soften the edges too), HIGHER leaves more detail and noise. Default (when creating): 0.08, which flattens fine noise and skin texture while keeping hard edges sharp.
preserve_luminosityNoblack_white only. Default (when creating): false.

Output Schema

NameRequiredDescriptionDefault
maskNo
nameNo
typeNo
filter_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / spread / description
      Previous value: -"outer_glow only. Pixels the glow's solid core grows past the alpha edge before it blurs, 0..100. Default (when creating): 4. SPATIAL."New value: +"outer_glow only. Pixels the glow's solid core grows past the alpha edge before it blurs, 0..50. Default (when creating): 4. SPATIAL."
    • changedInput schema / properties / spread / maximum
      Previous value: -100New value: +50
    • changedInput schema / properties / width / description
      Previous value: -"outline only. Stroke thickness in pixels at full resolution, 1..100 (the grow is capped at 100). Default (when creating): 4. SPATIAL. The stroke grows outward from the layer's alpha edge (round corners) and the layer's own pixels are untouched."New value: +"outline only. Stroke thickness in pixels at full resolution, 1..50. Default (when creating): 4. SPATIAL. The stroke grows outward from the layer's alpha edge (round corners) and the layer's own pixels are untouched."
    • changedInput schema / properties / width / maximum
      Previous value: -100New value: +50
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare a generic write profile (readOnly=false, idempotent=false, destructive=false, openWorld=true). The description adds substantial behavior the annotations cannot: re-edit is a MERGE that preserves omitted fields, masks are frozen at creation, external filters are refused and must be deleted and recreated, transform tools refuse once a masked filter exists, and specific effects stay locked or auto-update their center/angle/offset under rotation.

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 create-vs-re-edit distinction and the sibling alternative are front-loaded in the first sentence, which is the right priority. The body is long and partially duplicates schema text (mask, filter_id, ordering), but for a 29-parameter tool with heavy cross-effect interactions most sentences carry distinct constraints rather than filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need no explanation. Given the tool's complexity, the description still covers everything an agent needs before calling: mode selection, effect semantics, spatial vs relative units, ordering hazards, refusal conditions, masking limits, and the verification step with manage_filters.

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 description coverage is 100%, so the per-field baseline is 3, but the description adds cross-parameter semantics the schema does not carry: 'type picks the effect; a field that belongs to another effect is refused', the layer-vs-flattened targeting rule, and the mapping of each effect to its controlling fields. It does not need to restate ranges, which are already exhaustively in the schema.

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?

First sentence states a specific verb and resource ('Add a non-destructive effect to a layer'), plus the alternate mode ('re-edit one in place with filter_id') and enumerates the exact effect types. It explicitly positions itself against siblings ('the same live, editable, maskable mechanism as add_adjustment', 'For a plain blur use add_adjustment type=gaussian_blur'), so an agent can separate it from add_adjustment, manage_filters and photo_effect without opening any schema.

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

Usage Guidelines5/5

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

It names concrete alternatives with the condition that selects them (plain blur -> add_adjustment type=gaussian_blur; stack management -> manage_filters op=list/set_visibility/delete). It also spells out when-not and sequencing constraints: order of straighten/flip/resize then crop then masked effects, the refusal conditions, and the delete-and-recreate path for non-Editmamei effects.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources