GIMP Studio MCP

v0.4.0
com.twelvetake/gimp-studio-mcp Checked 14 hours ago Published 1 month ago

Enables AI assistants to edit images in GIMP 3, with tools for print and DTF transfer production.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

status

GIMP/bridge health: GIMP version, bridge version, mode, open-image count, and the names seeded into the persistent namespace. `warnings` reports a bridge in GIMP older than this package expects, and any timeout setting that is not a usable number of seconds.

list_images

List open images: id, name (basename), width, height, dirty flag.

set_active_image

Set the active image by integer id or basename string. Tools that take `image` act on the active image when it is omitted: the image last chosen here, opened or created, while it stays open; otherwise GIMP's first open image. A checkpoint copy is never the active image.

ParameterTypeDescription
image *

gimp_exec

Raw escape hatch: run Python inside GIMP. Returns the structured envelope {ok, result, stdout, warnings, error}; stdout is preserved even on error. Set a top-level `_result` for structured output. The persistent namespace has Gimp/Gegl/Gio/GLib/GObject/Babl, `pdb`, `find_image(spec)`, and `compat` (color/read_pixel/color_to_alpha/...). Runs arbitrary host code by design (same trust boundary as the local user); set GIMP_MCP_NO_EXEC=1 to skip registering this tool. See SECURITY.md.

ParameterTypeDescription
code *string
undo_groupboolean

reset_namespace

Reset the persistent namespace. scope='soft' (default): clear user-defined vars and re-seed the baseline; the canvas/open images are untouched. scope='scratch' (guarded HARD reset): soft + delete only bridge-created scratch images (checkpoint snapshots tagged in `_gimpmcp_scratch`); never touches user-opened or agent working images.

ParameterTypeDescription
scopestring

get_metadata

Metadata for an OPEN image: pixel width/height, resolution [x_dpi, y_dpi], base type, precision, file path, dirty flag, and per-layer info (size, opacity, visible, has_alpha). `image` = id/basename, or omit for the active image. To inspect a file ON DISK (e.g. verify an export's pixels / DPI), open_image it first, then call this on the returned id.

ParameterTypeDescription
image

new_image

Create a new RGBA image. fill: white|transparent|background|foreground. Returns the new image id + size.

ParameterTypeDescription
height *integer
width *integer
fillstring
namestring

open_image

Open an image file (any format GIMP loads). Returns new image id + size.

ParameterTypeDescription
path *string

export_image

Export an image to a file (format by extension: png/jpg/tiff/webp/...). Works on a COPY — the source image is never modified. ALPHA-SAFE: transparency is PRESERVED by default for formats that support it (png/tiff/webp/tga/gif) and only flattened for formats that can't hold alpha (jpg/bmp) — so a transparent cutout isn't silently ruined. `flatten=True` forces a flattened opaque export; `flatten=False` forces keep-alpha (merge visible, no flatten). For DTF PNGs prefer `export_dtf_png` (also tags DPI). Returns {saved, format, flattened,…

ParameterTypeDescription
path *string
flatten
image

create_layer

Create a new transparent RGBA layer (default sized to the image) and insert it at `position` (0=top) under optional `parent` group.

ParameterTypeDescription
name *string
height
image
opacitynumber
parent
positioninteger
width

layer_from_file

Load an image file as a new layer in the image and insert it (top by default). Optional `name`/`parent`/`position`.

ParameterTypeDescription
path *string
image
name
parent
positioninteger

duplicate_layer

Duplicate a layer; the copy is inserted just above the original. `layer` = id/name, or omit for the active layer.

ParameterTypeDescription
image
layer
name

delete_layer

Remove a layer from the image. `layer` = id/name, or omit for active.

ParameterTypeDescription
image
layer

reorder_layer

Move a layer to absolute `position` (0=top) within its parent, or into a different `parent` group when given.

ParameterTypeDescription
image
layer
parent
positioninteger

set_opacity

Set a layer's opacity (0-100 float).

ParameterTypeDescription
opacity *number
image
layer

set_blend_mode

Set a layer's blend mode (NORMAL, MULTIPLY, SCREEN, OVERLAY, ...). Case/sep insensitive; unknown names fall back to NORMAL.

ParameterTypeDescription
mode *string
image
layer

set_visible

Show/hide a layer.

ParameterTypeDescription
visible *boolean
image
layer

rename_layer

Rename a layer.

ParameterTypeDescription
name *string
image
layer

merge_down

Merge a layer down into the one below it (EXPAND_AS_NECESSARY). Destructive. Returns the resulting merged layer.

ParameterTypeDescription
image
layer

flatten

Flatten the image to a single layer. Destructive.

ParameterTypeDescription
image

group_create

Create an empty layer group, inserted at `position` (0=top) under optional `parent`.

ParameterTypeDescription
image
name
parent
positioninteger

group_add

Move an existing layer into a layer group at `position` (0=top).

ParameterTypeDescription
group
image
layer
positioninteger

group_ungroup

Dissolve a layer group: lift its children to the group's parent (in order) and remove the empty group. Destructive to the group structure.

ParameterTypeDescription
group
image

move_layer

Move a layer to absolute canvas offsets (x, y).

ParameterTypeDescription
x *integer
y *integer
image
layer

offset_layer

Offset a layer by a relative delta (dx, dy) from its current position.

ParameterTypeDescription
dxinteger
dyinteger
image
layer

offset_content

Roll a layer's PIXEL CONTENT by (dx, dy) — distinct from offset_layer, which repositions the layer on the canvas. wrap=True wraps edges around (use it to seam-check a tileable texture); wrap=False fills the vacated strip per fill: transparent|color (color uses the `color` name/hex, default clear).

ParameterTypeDescription
color
dxinteger
dyinteger
fillstring
image
layer
wrapboolean

seam_check

Wrap-offset a layer's content by half its size so a tileable texture's seams land in the middle for inspection (pair with get_bitmap). axis: both|x|y. Destructive — undo to revert (re-running the same axis restores only when that dimension is even; for odd sizes floor(w/2) applied twice lands 1px off).

ParameterTypeDescription
axisstring
image
layer

add_mask

Add a layer mask. mask_type: white|black|alpha|alpha-transfer| selection|copy|channel. Omit `layer` for the selected/top layer. For mask_type='channel' pass `channel` (id/name) as the source, or have a channel already selected; with neither, channel masks return supported=False (GIMP 3.0.4 create_mask(CHANNEL) needs a selected channel and exposes no source-channel parameter).

ParameterTypeDescription
channel
image
layer
mask_typestring

apply_mask

Merge the layer's mask into its alpha (destructive). No-op if no mask.

ParameterTypeDescription
image
layer

remove_mask

Discard the layer's mask without applying it (destructive).

ParameterTypeDescription
image
layer

add_alpha

Add an alpha channel to the layer if it lacks one.

ParameterTypeDescription
image
layer

lock_alpha

Lock (or unlock) the layer's alpha channel against painting.

ParameterTypeDescription
image
layer
lockedboolean

luminance_to_alpha

Map luminance to transparency per-pixel (destructive): default makes dark pixels transparent and bright pixels opaque (white-art-on-black); invert=True makes bright pixels transparent (knock out white/highlights). Computed directly over the layer buffer (no dedicated GEGL op exists in GIMP 3.0.4).

ParameterTypeDescription
image
invertboolean
layer

color_to_alpha

SOFT knockout: remove a color to transparency with graded alpha (destructive; gegl:color-to-alpha). color: name/#rrggbb. The colour is subtracted from every pixel that contains it, so edges and matching interior tones fade smoothly — great for feathered/anti-aliased backgrounds (e.g. a clean black knockout from #000000 at threshold ~0.15-0.20). Higher `transparency_threshold` (0-1) removes a wider band of near-target colours; `opacity_threshold` (0-1) sets where fully-opaque begins. For a CRISP, hard-edged cut (select-by-colour + delete…

ParameterTypeDescription
colorstring
image
layer
opacity_thresholdnumber
transparency_thresholdnumber

cutout_color

HARD knockout: select a colour and DELETE it to transparency — the crisp, predictable cutout (the tool form of by-hand 'add alpha -> select by colour -> delete'). Auto-adds alpha. WYSIWYG: no auto-mode, no defringe, no alpha-clean. Colour to remove: explicit `color` (name/#hex/rgb) OR a `sample_xy=[x,y]` eyedropper (one is required). `threshold` (0-1, default 0.15) = colour-match tolerance. `contiguous=True` removes only the edge-connected region (keeps interior areas that reuse the colour); seeds from `sample_xy` if given, else the ne…

ParameterTypeDescription
antialiasboolean
color
contiguousboolean
feathernumber
image
layer
sample_xy
thresholdnumber

threshold_alpha

Binarize the alpha channel at `value` (0..1) for a clean print edge (destructive).

ParameterTypeDescription
image
layer
valuenumber

select_rect

Rectangular selection. op: replace|add|subtract|intersect. Returns selection bounds.

ParameterTypeDescription
h *integer
w *integer
x *integer
y *integer
image
opstring

select_ellipse

Elliptical selection inscribed in the x,y,w,h box. op: replace|add|subtract|intersect.

ParameterTypeDescription
h *integer
w *integer
x *integer
y *integer
image
opstring

select_by_color

Select all pixels matching a color (name/#rrggbb/(r,g,b[,a])) within threshold (0..1). op: replace|add|subtract|intersect.

ParameterTypeDescription
color *
image
layer
opstring
thresholdnumber

fuzzy_select

Contiguous color (magic-wand) selection seeded at x,y within threshold (0..1). op: replace|add|subtract|intersect.

ParameterTypeDescription
x *integer
y *integer
image
layer
opstring
thresholdnumber

select_all

Select the entire image canvas.

ParameterTypeDescription
image

select_none

Clear the selection (select nothing).

ParameterTypeDescription
image

select_invert

Invert the current selection.

ParameterTypeDescription
image

select_grow

Grow the selection outward by `steps` pixels.

ParameterTypeDescription
steps *integer
image

select_shrink

Shrink the selection inward by `steps` pixels.

ParameterTypeDescription
steps *integer
image

select_feather

Feather (soften) the selection edge by `radius` pixels.

ParameterTypeDescription
radius *number
image

select_border

Replace the selection with a border band `radius` pixels wide.

ParameterTypeDescription
radius *integer
image

selection_to_channel

Save the current selection to a new channel. Returns the channel id.

ParameterTypeDescription
image
name

select_from_alpha

Select from a layer's alpha (opaque pixels). layer = id/name or omit for the active drawable. op: replace|add|subtract|intersect.

ParameterTypeDescription
image
layer
opstring

select_from_path

Select the region enclosed by a path. path = id/name or omit for the active path. op: replace|add|subtract|intersect. If the image has no paths and none is named, returns {"supported": false} (nothing to do) rather than erroring.

ParameterTypeDescription
image
opstring
path

foreground_select

Edge-aware SUBJECT selection via SIOX/matting (gimp-drawable-foreground-extract). Refines a ROUGH hint into a clean foreground selection — good for hair/soft/complex edges and backgrounds that AREN'T a flat colour (where cutout_color / select_by_color fail). It is SEMI-automatic: it needs a rough hint and does NOT auto-detect the subject. Rough hint: pass a bounding box `x, y, w, h` roughly around the subject, OR make a rough selection first and omit the box. `band` = px the hint is grown / shrunk to form the 'unknown' boundary ring th…

ParameterTypeDescription
band
h
image
layer
w
x
y

set_fg

Set the foreground color. color = name|'#rrggbb'|(r,g,b[,a]).

ParameterTypeDescription
color *

set_bg

Set the background color. color = name|'#rrggbb'|(r,g,b[,a]).

ParameterTypeDescription
color *

set_brush

Set the active paint brush by name (e.g. '2. Hardness 050').

ParameterTypeDescription
name *string

set_paint_opacity

Set the paint/context opacity (0-100).

ParameterTypeDescription
opacity *number

fill

Fill the whole drawable. fill_type: foreground|background|white| transparent|pattern. `layer`/`image` optional (default active).

ParameterTypeDescription
fill_typestring
image
layer

bucket_fill

Flood-fill from seed point (x, y) with `color` (or current fg). mode = layer-mode name (e.g. 'normal', 'multiply').

ParameterTypeDescription
x *number
y *number
color
image
layer
mode
opacity

gradient

Draw a gradient from (x1,y1) to (x2,y2). `gradient` = named gradient (else fg->bg). gradient_type: linear|bilinear|radial|conical-symmetric|...

ParameterTypeDescription
x1 *number
x2 *number
y1 *number
y2 *number
gradient
gradient_typestring
image
layer

stroke_selection

Stroke the active selection's outline with `color`/`line_width` (current fg/line width if omitted).

ParameterTypeDescription
color
image
layer
line_width

pencil

Hard-edged pencil stroke. points = flat [x1,y1,x2,y2,...]. Uses `color` or current fg.

ParameterTypeDescription
points *array
color
image
layer

paintbrush

Soft paintbrush stroke. points = flat [x1,y1,x2,y2,...]. Optional `brush` name + `size`; uses `color` or current fg.

ParameterTypeDescription
points *array
brush
color
image
layer
size

create_text_layer

Create a text layer. font=name (else context font); size in px; color by name/#hex/(r,g,b); justify=left|right|center|fill; x/y = position offsets.

ParameterTypeDescription
text *string
color
font
image
justify
letter_spacing
line_spacing
sizenumber
x
y

set_text_props

Mutate any subset of an existing text layer's properties (omitted args are left unchanged). `layer` = id/name of a text layer.

ParameterTypeDescription
layer *
color
font
image
justify
letter_spacing
line_spacing
size
text
x
y

outline_text

Add an outline beneath a text layer: alpha->selection, grow by `radius`, fill onto a new layer in `color`. Destructive (adds a layer).

ParameterTypeDescription
layer *
colorstring
image
radiusinteger

check_fonts

Report availability of each font name -> {name: bool}.

ParameterTypeDescription
fonts *array

substitute_font

Best-effort font-substitution report: whether `old` is missing and `new` is present (does not mutate global GIMP config).

ParameterTypeDescription
new *string
old *string

levels

Adjust levels on a drawable. channel: value|red|green|blue|alpha. Inputs/outputs are 0.0-1.0 floats in LINEAR light, not the 0-255 sRGB values color_at reports: a pixel color_at reads as 200 sits at about 0.58 here. gamma is the midtone exponent.

ParameterTypeDescription
channelstring
gammanumber
high_innumber
high_outnumber
image
layer
low_innumber
low_outnumber

curves

Apply a spline curve. `points` = flat [x0,y0,x1,y1,...] control points in 0.0-1.0, in LINEAR light like levels (not the sRGB values color_at reports). channel: value|red|green|blue|alpha.

ParameterTypeDescription
points *array
channelstring
image
layer

brightness_contrast

Adjust brightness and contrast. Each ranges -1.0..1.0 (0 = no change).

ParameterTypeDescription
brightnessnumber
contrastnumber
image
layer

hue_saturation

Adjust hue/lightness/saturation. range: all|red|yellow|green|cyan|blue| magenta. hue -180..180, lightness/saturation -100..100, overlap 0..100.

ParameterTypeDescription
huenumber
image
layer
lightnessnumber
overlapnumber
rangestring
saturationnumber

color_balance

Shift color balance for a tonal range: shadows|midtones|highlights. Each channel pair is -100..100; preserve_lum keeps luminosity.

ParameterTypeDescription
cyan_rednumber
image
layer
magenta_greennumber
preserve_lumboolean
rangestring
yellow_bluenumber

desaturate

Convert to grayscale values in place. mode: luminance|luma|lightness| average|value.

ParameterTypeDescription
image
layer
modestring

invert

Invert colors. linear=True inverts in linear light, else perceptual.

ParameterTypeDescription
image
layer
linearboolean

posterize

Reduce each channel to `levels` discrete tones (2..255).

ParameterTypeDescription
levels *integer
image
layer

threshold

Black/white threshold: pixels in [low, high] -> white, else black. low/high are 0.0-1.0 on the same sRGB scale as color_at (divide its 0-255 values by 255). channel: value|red|green|blue|alpha.

ParameterTypeDescription
channelstring
highnumber
image
layer
lownumber

normalize

Auto-stretch tones to fill the full 0-255 range (like Colors > Auto > Stretch Contrast). keep_colors=False (default) stretches each channel independently — maximum contrast, but may shift colour balance; keep_colors=True stretches all channels uniformly to preserve hue (gegl:stretch-contrast).

ParameterTypeDescription
image
keep_colorsboolean
layer

apply_filter

Apply any GEGL operation to a layer (destructive merge). `op` = full op name e.g. 'gegl:pixelize'. `params` = {property: value} (underscores become hyphens; color-like values auto-coerced).

ParameterTypeDescription
op *string
image
layer
params

gaussian_blur

Gaussian blur a layer (gegl:gaussian-blur). std_dev_x/y in pixels.

ParameterTypeDescription
image
layer
std_dev_xnumber
std_dev_ynumber

unsharp_mask

Sharpen a layer via unsharp mask (gegl:unsharp-mask). std_dev = blur radius, scale = sharpen strength.

ParameterTypeDescription
image
layer
scalenumber
std_devnumber

drop_shadow

Add a drop shadow to a layer (gegl:dropshadow). x/y = offset, blur = shadow radius, grow = shadow expansion, color = name/'#rrggbb'/(r,g,b). NOTE: gegl:dropshadow ENLARGES the target layer and shifts its offsets so the soft shadow has room to render (verified on GIMP 3.0.4: a 64x48 layer at (0,0) became 116x100 at (-20,-20)). The layer may therefore extend beyond the canvas; flatten or crop afterward if you need it clipped.

ParameterTypeDescription
blurnumber
colorstring
grownumber
image
layer
opacitynumber
xnumber
ynumber

print_geometry

Set print resolution (dpi) and/or scale to a physical size in inches. Pass width_in and/or height_in to scale (aspect preserved if one given). Reports current inches @ dpi and warns on upscaling.

ParameterTypeDescription
dpi
height_in
image
width_in

trim_to_content

Autocrop the image to the artwork's alpha bounding box, plus optional padding (px). Removes empty transparent margins.

ParameterTypeDescription
image
layer
paddinginteger

white_underbase

Core DTF op: create a white-ink layer BELOW the art, filled to the art's alpha shrunk inward by `choke` px at `opacity`. Returns new layer id.

ParameterTypeDescription
chokeinteger
image
layer
opacitynumber

edge_choke

Pull the art's effective alpha edge inward by `pixels` (trims a thin rim — useful before underbase or to remove fringing).

ParameterTypeDescription
image
layer
pixelsinteger

edge_spread

Grow (dilate) the art's alpha edge outward by `pixels`, fattening the artwork and carrying the edge colour into the grown ring (morphological alpha dilate via gegl:median-blur).

ParameterTypeDescription
image
layer
pixelsinteger

knockout_background

One-click DTF background / shirt-colour knockout. Auto-adds an alpha channel if the source is flat (no need to call add_alpha first). For a dead-simple crisp cutout of ONE flat colour, prefer `cutout_color` (hard) or `color_to_alpha` (soft) — this tool adds garment-aware auto-technique + presets on top. Colour to remove, by priority: explicit `color` (name/#hex) > `shirt=` garment preset (see list_shirt_presets) > `sample_xy=[x,y]` eyedropper > AUTO-DETECT from the image edges. (A `shirt=` preset still supplies the technique +…

ParameterTypeDescription
cleanboolean
color
contiguous
defringeboolean
feathernumber
image
layer
modestring
sample_xy
shirt
tolerance

list_shirt_presets

List the built-in garment / shirt-colour presets for knockout_background(shirt=...) — name, display, hex, technique, tolerance.

clean_for_dtf

Binarize the ALPHA channel at `threshold` (0-1, default 0.5): pixels below it -> fully transparent (drops faint dust/noise), at/above -> fully opaque (crisp ink edges for film). RGB is untouched. NOTE: this HARDENS every soft/anti-aliased edge and drops intentional low-alpha interior detail (faint gradients / highlights) below the threshold — skip it, or lower the threshold, when the art has soft edges worth keeping.

ParameterTypeDescription
image
layer
thresholdnumber

despill

Reduce edge color spill left over from a knockout (best-effort approximation; flag if results are off).

ParameterTypeDescription
amountnumber
colorstring
image
layer

halftone_separation

Apply a newsprint halftone screen. PREVIEW/APPROXIMATION ONLY — this is a visual halftone, NOT registration-accurate channel film separations.

ParameterTypeDescription
anglenumber
cell_sizenumber
image
layer

gang_sheet

Lay out multiple design files on a print sheet via a left-to-right / top-to-bottom shelf packer (gutter between items), growing height as needed, then export a transparent PNG. A design wider than the sheet's printable width is skipped with a warning; with `rotate=True`, a design that fits when turned 90 degrees is rotated instead. If no design can be placed, nothing is saved and the call returns ok=false with each file's reason. Returns {placed, skipped, sheet_px, out_path, image}.

ParameterTypeDescription
files *array
out_path *string
dpinumber
gutter_innumber
rotateboolean
sheet_width_innumber

bleed_and_safe

Add a bleed margin (resize canvas by bleed_in on each side) and report the inner safe-area rect (inset by safe_in).

ParameterTypeDescription
bleed_innumber
image
safe_innumber

export_dtf_png

Export a transparent, print-ready PNG. PRESERVES ALPHA — merges visible layers WITHOUT flattening (flattening would drop alpha and ruin the DTF transfer). DPI: if `dpi` is given the file is tagged at it; if OMITTED the file inherits the image's CURRENT resolution (e.g. whatever `print_geometry` set). This only writes the DPI tag — it never resamples pixels, so set the physical print size with `print_geometry` FIRST, then export. Works on a duplicate (source untouched); returns the saved path and the DPI tag written.

ParameterTypeDescription
path *string
dpi
image

get_profile

Read the image's embedded ICC profile label (None = built-in sRGB). `image` = id/basename, or omit for the active image.

ParameterTypeDescription
image

assign_profile

Tag the image with an ICC profile WITHOUT converting pixels (assign). `icc_path` = path to a .icc/.icm file. RGB/working-space use.

ParameterTypeDescription
icc_path *string
image

convert_profile

Convert pixels into the target ICC working space (RGB/working-space only). intent: perceptual|relative-colorimetric|saturation|absolute-colorimetric. bpc = black-point compensation.

ParameterTypeDescription
icc_path *string
bpcboolean
image
intentstring

soft_proof

NOT SUPPORTED: soft-proofing is a VIEW-only display simulation in GIMP 3.x, not a scriptable pixel operation — this ALWAYS fails. Returns ok=false with {supported: false, note}; no pixels are changed. Use convert_profile to bake the conversion instead.

ParameterTypeDescription
icc_path
image
intentstring

to_grayscale

Convert the image to GRAYSCALE mode (destructive).

ParameterTypeDescription
image

to_rgb

Convert the image to RGB mode (destructive).

ParameterTypeDescription
image

list_profiles

NOT SUPPORTED: the libgimp API cannot enumerate installed ICC profiles — this ALWAYS fails. Returns ok=false with {supported: false, note}. Pass explicit .icc paths instead; get_profile reads an image's own profile.

get_bitmap

THE vision tool: render a scaled/cropped/composited COPY and return it as a VIEWABLE image (an MCP image block you can actually see) plus size metadata. region=[x,y,w,h] crops first; background (name/hex) flattens over an opaque colour (else alpha is kept); the longest side is scaled to <= max_dim (clamped 1..4096). If the encoded image would exceed max_bytes (~4 MB default) it is auto-downscaled to fit your context. Pass save_to=<abs path> to write the render to disk and get the path back instead of an inline image — use this for previ…

ParameterTypeDescription
background
fmtstring
image
max_bytesinteger
max_diminteger
region
save_to

read_region

Structured 2D grid of [r,g,b,a] pixels for a rectangle. Capped at w*h<=4096 (raises if larger — use get_bitmap for big areas).

ParameterTypeDescription
h *integer
w *integer
x *integer
y *integer
image
layer

color_at

Sample one pixel: returns {rgba:[r,g,b,a]} (0-255).

ParameterTypeDescription
x *integer
y *integer
image
layer

histogram

Channel statistics (value|red|green|blue|alpha|luminance). space='perceptual' (default) computes the stats from the drawable's own pixels in the same 0-255 sRGB values as color_at/get_bitmap, returning mean, std_dev, median, min, max (all 0-255) plus pixels/count. space='gimp' returns GIMP's native PDB histogram (mean/std_dev/median/percentile, no min/max). Very large drawables are point-sampled at reduced resolution (min/max are from the sample, flagged by `sampled`).

ParameterTypeDescription
channelstring
image
layer
spacestring

list_gegl_ops

List available GEGL operation names, optionally filtered by substring.

ParameterTypeDescription
filter

describe_op

Introspect a GEGL op: categories, description, and its properties.

ParameterTypeDescription
op *string

list_procedures

List PDB procedure names, optionally filtered by substring.

ParameterTypeDescription
filter

list_fonts

List installed font names, optionally filtered by substring.

ParameterTypeDescription
filter

list_brushes

List brush names, optionally filtered by substring.

ParameterTypeDescription
filter

list_patterns

List pattern names, optionally filtered by substring.

ParameterTypeDescription
filter

list_gradients

List gradient names, optionally filtered by substring.

ParameterTypeDescription
filter

list_palettes

List palette names, optionally filtered by substring.

ParameterTypeDescription
filter

checkpoint

Snapshot an image (a real duplicate) so you can restore() it later. Returns a numeric checkpoint_id. `image` = id/basename, or omit for active.

ParameterTypeDescription
image
label

restore

Roll an image back to a checkpoint by rebuilding its layer stack from the snapshot. The checkpoint stays usable. `image` = which image to restore into.

ParameterTypeDescription
checkpoint_id *integer
image

list_checkpoints

List live checkpoints: id, snapshot image_id, and whether it's still valid.

undo_group_begin

Begin an undo group on an image: subsequent edits collapse into one undo step. Pair with undo_group_end. `image` = id/basename, or omit for active.

ParameterTypeDescription
image

undo_group_end

End the undo group started by undo_group_begin on this image.

ParameterTypeDescription
image

undo

Undo the last operation — only if GIMP exposes scriptable undo, which GIMP 3.x does NOT (undo is interactive), so this returns ok=false with {supported: false} and rolls nothing back. Use checkpoint()/restore().

ParameterTypeDescription
image

redo

Redo the last undone operation — only if GIMP exposes scriptable redo, which GIMP 3.x does NOT, so this returns ok=false with {supported: false} and redoes nothing. Use checkpoint()/restore() for reliable rollback.

ParameterTypeDescription
image