Skip to main content
Glama

add_effect

Destructive

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. A filter that came with the file cannot be re-edited and 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 that came with the file. 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. A vignette that takes a corner to pure black is reported in the result (vignette_black_corners): where it reaches black it leaves a hard ring short of the corner. 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).

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": {
      "image": "<image>",
      "type": "<type>"
    },
    "name": "add_effect"
  }
}

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 made with these tools, 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. A lower gamma blackens them sooner: measured on 4:5 and square frames, radius 1.4 at gamma 1.6 and radius 1.6 at gamma 1.5 both reach pure black before the corner, and where the darkening reaches black it shows as a hard edge (a ring) on any frame shape. For a falloff with no edge, keep the corners above 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 made with these tools 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.02, a fine film grain; 0.04 is already a heavy, visible grain on a photo.
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
noteNovignette only: what to change when a corner went to pure black.
typeNo
filter_idNo
mindset_notesNo
vignette_black_cornersNovignette only: the corners the photo now shows in pure black (empty when checked and none are).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedOutput schema / properties / editor_notes
      Removed value: -{
      -  "items": {
      -    "type": "string"
      -  },
      -  "type": "array"
      -}
    • addedOutput schema / properties / mindset_notes
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  2. Changed1 schema field changed
    • changedOutput schema / properties / vignette_black_corners / description
      Previous value: -"vignette only: the corners the photo now shows in pure black."New value: +"vignette only: the corners the photo now shows in pure black (empty when checked and none are)."
  3. Changed2 schema fields changed
    • addedOutput schema / properties / note
      Added value: +{
      +  "description": "vignette only: what to change when a corner went to pure black.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / vignette_black_corners
      Added value: +{
      +  "description": "vignette only: the corners the photo now shows in pure black.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  4. Changed2 schema fields changed
    • changedInput schema / properties / noise_amount / description
      Previous value: -"add_noise only. THE amount control — sets red/green/blue uniformly (grayscale-leaning noise, not a color-tinted one). Default (when creating): 0.2."New value: +"add_noise only. THE amount control — sets red/green/blue uniformly (grayscale-leaning noise, not a color-tinted one). Default (when creating): 0.02, a fine film grain; 0.04 is already a heavy, visible grain on a photo."
    • changedInput schema / properties / radius / description
      Previous value: -"vignette: 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."New value: +"vignette: 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. A lower gamma blackens them sooner: measured on 4:5 and square frames, radius 1.4 at gamma 1.6 and radius 1.6 at gamma 1.5 both reach pure black before the corner, and where the darkening reaches black it shows as a hard edge (a ring) on any frame shape. For a falloff with no edge, keep the corners above 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."
  5. Changed1 schema field changed
    • addedOutput schema / properties / editor_notes
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  6. Changed2 schema fields changed
    • changedInput schema / properties / filter_id / description
      Previous value: -"Re-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."New value: +"Re-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 made with these tools 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."
    • changedInput schema / properties / mask / description
      Previous value: -"Name 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."New value: +"Name 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 made with these tools, since they cannot keep a mask aligned through those transforms. Cropping afterward is always safe."
  7. 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
  8. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources