Skip to main content
Glama

gimp_add_adjustment

Adds or re-edits live, non-destructive adjustment filters on a chosen GIMP layer, so changes stay editable until export.

Instructions

Headless GIMP: append (or, with filter_id, re-edit in place) a NON-DESTRUCTIVE adjustment filter — stays live and re-editable; nothing bakes into pixels until gimp_export, and gimp_filter op=delete removes it again. type picks the adjustment: curves, levels, exposure, brightness_contrast, hue_saturation, color_balance, color_temperature, shadows_highlights, saturation, vibrance, sharpen, noise_reduction, gaussian_blur, clarity. A field another type uses is refused, naming this type's own fields. A filter applies to ONE layer (layer_id or layer, else the selected or top layer), not to the flattened image — on a multi-layer document, say which layer. For type vibrance, the knob is the vibrance field — saturation on that type is a separate plain multiplier that normally stays untouched. curves: ONE filter per channel — add separate filters for red and blue rather than one filter for both; points are [input, output] 0-255 pairs including the endpoints. hue_saturation and color_balance likewise carry ONE range per filter. gaussian_blur: radius in pixels at full resolution; combine with a saved-selection mask for soft-focus or background-blur effects. clarity: midtone local contrast (the clarity field, 0..100); reach for it instead of a large-radius sharpen. A re-edit (filter_id) MERGES: any field you omit keeps the filter's existing value, so re-editing {contrast: 50} on a brightness_contrast filter doesn't reset brightness. Only filters Editmamei created can be re-edited; one added in the GIMP GUI is refused (delete and re-create it). mask (a saved selection channel name) confines a NEW filter — fixed at creation, cannot change on a re-edit. ORDER MATTERS: straighten / flip / resize the canvas first, then crop, THEN add any masked adjustment — rotate, flip, and resize all refuse outright once a masked adjustment filter exists, or any filter not created by Editmamei (for example one added in the GIMP GUI). color_temperature's direction is counter-intuitive: raising to_kelvin WARMS the image. Check the stack afterward with gimp_filter (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": "gimp_add_adjustment"
  }
}

Input Schema

NameRequiredDescriptionDefault
hueNohue_saturation only. Degrees. Default (when creating): 0.
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 (gimp_transform_canvas, gimp_resize_image), then crop, THEN add masked adjustments — rotate, flip, and resize all refuse outright once any masked adjustment filter exists on the image, or any filter not created by Editmamei (for example one added in the GIMP GUI), since they cannot keep a mask aligned through those transforms. Cropping afterward is always safe.
nameNoLabel for a new filter, e.g. "Lift shadows". Made unique automatically.
typeYesWhich adjustment to apply/re-edit. Each type maps to exactly one GEGL/GIMP operation; see the per-field descriptions below for which fields apply to which type.
gammaNolevels only. Midtone gamma, 0.1..10 — >1 brightens midtones, <1 darkens. Default (when creating): 1.0.
imageYesImage id, as returned by gimp_open_document.
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.
rangeNohue_saturation: one of all/red/yellow/green/cyan/blue/magenta (default 'all'). color_balance: one of shadows/midtones/highlights (default 'midtones'). ONE range per filter: adjusting reds and blues, or shadows and highlights, takes one filter per range (the same rule as one curves filter per channel). Passing a value from the other type's set is rejected by the bridge naming the real allowed set for the `type` you gave.
scaleNosaturation only. 1.0 = unchanged. Default (when creating): 1.0.
amountNosharpen only. GEGL's unsharp-mask strength MULTIPLIER, not a percent: 0.5 is the default, 1.0 is strong, and values above ~3 are extreme. Default (when creating): 0.5.
in_lowNolevels only. Input black point; must stay below in_high (an empty or inverted input range is refused). Default (when creating): 0.
pointsNocurves only. [input, output] pairs, 0-255 each, ascending input — include the endpoints, e.g. [[0,0],[64,90],[255,255]] lifts shadows. Required when creating (no filter_id); omitted on a re-edit keeps the existing curve.
radiusNoshadows_highlights: spatial falloff radius, 0.1..1500 (default 100 when creating). sharpen: unsharp-mask std-dev, 0..1500 (default 3.0 when creating). gaussian_blur: blur radius (std-dev) in pixels at full resolution, 0..1500 (default 1.5 when creating). clarity: high-pass radius, the size of the detail it works on, in pixels at full resolution, 1..500 (default 40 when creating); about 1% of the long edge suits most photos, 40 for 12 MP, 60 for 24 MP. All four are SPATIAL (radius-scaled on the proxy preview, see gimp_overview).
channelNocurves/levels only. 'value' adjusts all channels together (tone); red/green/blue adjusts ONE channel (color) — a filter carries only one channel, so shifting color needs separate filters for red and blue. Default (when creating): value. Omitted on a re-edit keeps the existing filter's own channel.
clarityNoclarity only. Midtone local contrast (a high-pass blended in Overlay): 25 is subtle, 50 clear, 100 strong. Shadows and highlights barely move, so it does not clip or darken the photo the way a large-radius sharpen does; use this instead of one. Above about 60 a light halo can show where a dark edge meets a bright sky. It only adds contrast: to soften texture, use gimp_add_effect type=surface_blur. Default (when creating): 25.
in_highNolevels only. Input white point; must stay above in_low. Default (when creating): 255.
out_lowNolevels only. Output black. Default (when creating): 0.
shadowsNoshadows_highlights only. Default (when creating): 0.
compressNoshadows_highlights only. How far the shadows/highlights effect reaches toward the midtones: higher confines it to the darkest and brightest tones. Default (when creating): 50.
contrastNobrightness_contrast only. Default (when creating): 0.
cyan_redNocolor_balance only. Default (when creating): 0.
exposureNoexposure only. Stops. Default (when creating): 0.
layer_idNoLayer id, as gimp_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.
out_highNolevels only. Output white. Default (when creating): 255.
strengthNonoise_reduction only. Neighbourhood size. Default (when creating): 4.
vibranceNovibrance only. THE vibrance control — a vibrance adjustment must set this field, not `saturation` (a separate, plain multiplier for this type that normally stays at its default). The scale follows Photoshop's Vibrance: +10 to +30 is a natural boost, +50 a strong one; negative values desaturate. Unlike Photoshop's, it lifts already-saturated colors (a blue sky, a bright shirt) about as much as muted ones, so check those areas with a histogram above about +50. Default (when creating): 0.
filter_idNoRe-edit this existing filter IN PLACE instead of adding a new one (must match `type`'s operation). Any per-type field you omit keeps the value it already had — this is a MERGE, not a reset. The values gimp_filter 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 (gimp_filter op=list shows source: "editmamei"); re-editing any other filter (for example one added in the GIMP GUI) 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.
lightnessNohue_saturation only. Default (when creating): 0.
thresholdNosharpen only. Default (when creating): 0.
to_kelvinNocolor_temperature only. The corrected target temperature. COUNTER-INTUITIVE DIRECTION: RAISING to_kelvin WARMS the image (it means "render as if shot under this light" — a higher assumed light temperature reads as a warmer correction). Example: from_kelvin 6500, to_kelvin 8000 renders WARMER, not cooler. Default (when creating): 6500.
brightnessNobrightness_contrast only. Default (when creating): 0.
highlightsNoshadows_highlights only. Default (when creating): 0.
saturationNohue_saturation: -100..100 percent (default 0 when creating), the field that actually adjusts saturation for that type. vibrance: a SEPARATE, plain saturation multiplier layered on top of the vibrance field below — 1.0 = unchanged (default when creating), 0..10 scale. It is NOT the vibrance knob; normally leave it alone and use `vibrance` instead. The bridge enforces the precise range for whichever `type` you gave.
whitepointNoshadows_highlights only. Shifts the white point: positive brightens the top end, negative pulls it down. Default (when creating): 0.
black_levelNoexposure only. Shadow black-point shift. Default (when creating): 0.0.
from_kelvinNocolor_temperature only. The temperature the photo currently looks shot under. Default (when creating): 6500.
yellow_blueNocolor_balance only. Default (when creating): 0.
magenta_greenNocolor_balance only. Default (when creating): 0.
shadows_ccorrectNoshadows_highlights only. Colour saturation kept in the lifted shadows (0 = none, 100 = full). Default (when creating): 100.
highlights_ccorrectNoshadows_highlights only. Colour saturation kept in the recovered highlights (0 = none, 100 = full). Default (when creating): 50.
preserve_luminosityNocolor_balance only. Default (when creating): true.

Output Schema

NameRequiredDescriptionDefault
maskNo
nameNo
typeNo
filter_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.11.1

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare a non-read-only, non-destructive, non-idempotent mutation, and the description goes far beyond them: nothing bakes into pixels until gimp_export, re-edits MERGE rather than reset, masks are fixed at creation, only Editmamei-created filters can be re-edited, and a filter applies to one layer only. These are precisely the operational constraints an agent needs and none are derivable from the annotations.

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 the first sentence and the rest is dense, non-filler guidance. It is long and a few clauses (curves one-per-channel, mask ordering) restate what the schema fields already say, but no sentence is purely decorative.

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?

With 41 parameters, an output schema, and a non-destructive mutation model, the description covers the failure modes (refused fields, refused re-edits, refused transforms after masking), the merge-on-re-edit rule, and the counter-intuitive color_temperature direction. Nothing an agent needs to invoke this correctly is left implicit.

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 baseline is 3, but the description adds cross-parameter routing value the schema cannot: a field belonging to another type is refused by name, vibrance is the real knob while saturation is a separate plain multiplier, and one range/channel per filter. Some of this duplicates per-field schema text, which keeps it from a 5.

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 and resource: 'append (or, with filter_id, re-edit in place) a NON-DESTRUCTIVE adjustment filter', and immediately distinguishes the effect from gimp_export (baking) and gimp_filter op=delete (removal). An agent can tell exactly what this does and how it differs from gimp_add_effect and gimp_filter 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 Guidelines5/5

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

Explicit routing rules throughout: use gimp_add_effect type=surface_blur to soften texture, check the stack with gimp_filter op=list, delete+re-create filters made in the GIMP GUI instead of re-editing. It also states ordering constraints ('straighten / flip / resize first, then crop, THEN masked adjustments') and the exact conditions under which transforms are refused.

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