Editmamei Desktop

v1.11.6
io.github.editmamei/editmamei-photoshop-mcp Checked 8 hours ago Published 19 hours ago

Photoshop and GIMP MCP server for AI photo editing, layer by layer with real tools

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

ps_list_capabilities

Live map of every tool this MCP exposes, grouped by capability — each group is a one-line purpose plus the tool names in it. Read-only and cheap. Reach for it to re-orient mid-session (what exists, what to reach for) when the overview brief has scrolled out of context, or to learn which tool names to look up. ps_overview tells you HOW to combine tools; this tells you WHAT exists, currently; tools/list has the full schema for any one you pick.

gimp_ping

Headless GIMP: test connection to the GIMP session and report session-start discovery signals. Starts the session on the FIRST call if it is not already running — this cold start is usually just a few seconds (about 10 seconds on macOS), so expect the first gimp_ping (or any first gimp_* call) in a session to be a bit slow; every call after that is fast. The VERY FIRST launch on a machine can instead take a few minutes (GIMP building its font cache, scanning plug-ins, macOS Gatekeeper) — during that window gimp_ping reports `starting: true` in structuredContent rather than failing; call it…

gimp_overview

Headless GIMP: orientation brief for the gimp_* tool surface — the headless workflow contract, curve laws (one filter per channel; re-edit by filter_id, don't stack), ledger-truth vs. readback, .xcf-vs-export, precision guidance, mask/geometry ordering, no undo for geometry, proxy-preview caveats, raw-file handling, and when to prefer gimp_* over ps_*. READ THIS FIRST when you're given an open-ended GIMP editing task. Read-only, idempotent, no document required, no GIMP round trip (returns a static markdown brief). Skip it for a trivial single-tool request where you already know which tool f…

gimp_open_document

Headless GIMP: open an image file — any format this GIMP install can load (JPEG, PNG, TIFF, WebP, HEIC/HEIF, XCF, and more) — in the headless GIMP session and return its image id — the id every other gimp_* tool keys on (there is no "active document" concept: explicit ids beat hidden state). Opening a .xcf restores its live, re-editable filters (the editmamei-filters ledger). Any selection saved in the file is cleared on open (every gimp_* op works on the whole canvas), so a later gimp_save_xcf does not keep it. Raw camera files need a raw-develop plug-in (darktable, RawTherapee, or ART)…

ParameterTypeDescription
file_path *stringAbsolute path to an image file. Opens any format this GIMP install can load — JPEG, PNG, TIFF, WebP, HEIC/HEIF, XCF, and more, depending on what GIMP + its plug-ins support. Raw camera files (DNG, C…
precisionstringPromote bit depth on open. 'keep' leaves the file's own precision; '16' or '32' converts to that bit depth BEFORE any grading — do this ahead of an aggressive exposure/levels/curves move on an 8-bit…

gimp_close_document

Headless GIMP: close an image WITHOUT saving. Save first with gimp_save_xcf (keeps filters live) or gimp_export (deliverable) if the work should be kept.

ParameterTypeDescription
image *integerImage id, as returned by gimp_open_document.

gimp_save_xcf

Headless GIMP: save the live GIMP document to a .xcf file — filters stay in place and re-editable afterward (the ".xcf ≈ .psd" framing: it is the working file, not the deliverable). Unlike gimp_export, this does NOT strip metadata — the source file's EXIF/XMP/IPTC (including GPS) carries into the .xcf exactly as it was on open, since this saves the working document itself rather than exporting a flattened copy. Refuses to overwrite an existing file unless overwrite: true. Save early: on a very large document a save can take tens of seconds. A call that runs past its time limit keeps runn…

ParameterTypeDescription
file_path *stringAbsolute path ending in .xcf. Saves the LIVE GIMP document — every filter stays in place and re-editable afterward (matches ps_save_psd's framing for .psd). For a deliverable (flattened, or a layere…
image *integerImage id, as returned by gimp_open_document.
overwritebooleanRefuses to overwrite an existing file unless true.

gimp_export

Headless GIMP: write a deliverable to disk — every live filter is baked in, and ALL metadata (EXIF/XMP/IPTC/GPS, thumbnail) is stripped unconditionally, never carried over from the source. Format is picked from the file_path extension: jpg/jpeg, png, webp and tif/tiff write a FLATTENED image; psd writes a LAYERED file for finishing in Photoshop or another editor. In a PSD, layers keep their masks, opacity, blend modes, visibility and groups; filters are baked into each layer; a group with its own filter is merged into one layer; text layers become pixels. Photoshop blends partly transparent…

ParameterTypeDescription
file_path *stringAbsolute path. The extension picks the format: jpg/jpeg, png, webp, tif/tiff (flattened), or psd (layered). Refuses .xcf outright — that is gimp_save_xcf's job. Metadata (EXIF/XMP/IPTC/GPS, thumbnai…
image *integerImage id, as returned by gimp_open_document.
bit_depthintegerPNG/TIFF/PSD only: output bit depth. JPEG/WebP are always 8-bit.
color_profilestring'keep' writes the image in its own color space with that profile embedded, so a phone's Display P3 photo keeps its full color. 'srgb' converts to sRGB first, the safest choice for viewers that ignore…
keep_alphabooleanPNG/WebP only: keep transparency. The visible layers are merged onto a transparent canvas, so areas no layer covers (a cut-out, say) stay transparent. Default false flattens onto white. Refused for JP…
losslessbooleanWebP only: lossless encoding. Ignored for other formats.
overwritebooleanRefuses to overwrite an existing file unless true.
png_compressionintegerPNG only: compression level, 0 (fastest, largest) to 9 (slowest, smallest). GIMP's own default of 9 measured far slower for negligible size gain on a typical photo, hence the lower default here. Ignor…
qualityintegerJPEG/WebP quality, 1-100 (higher = better/larger). Ignored for png/tiff. WebP itself accepts 0 too, but JPEG's own bound is 1-100, so this schema uses the tighter bound.
tiff_compressionstringTIFF only: compression scheme (lzw and adobe_deflate are lossless; jpeg is lossy). Ignored for other formats.

gimp_inspect

Headless GIMP: read-only state reader. `what`: 'documents' lists every image currently open in this headless GIMP session by id. 'document' describes ONE open image (dims, base_type, precision, color_profile, resolution, full layer tree, channels by id/name only — no coverage); 'layers' returns just the tree; 'channels' returns the channels WITH coverage (selected_pixels/fraction), the cost 'document' skips, and can stop early on a document with many named channels (`truncated: true`, `channels_skipped`). 'filter' describes one filter by filter_id, in the same shape gimp_filter (op=list) rep…

ParameterTypeDescription
what *stringWhat to inspect. 'documents' lists every image currently open in this headless session (id only). 'document' describes ONE open image by id: dims, base_type, precision, resolution, its full layer tree…
filterstringwhat='fonts' only: case-insensitive substring to narrow the font names by. The list is sorted and capped at 200 names; `total` counts every match.
filter_idintegerRequired for what='filter'. The filter id, as returned by gimp_add_adjustment or listed by gimp_filter (op=list).
imageintegerImage id, as returned by gimp_open_document. Required for every `what` except 'documents' and 'fonts'.

gimp_add_adjustment

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 t…

gimp_add_effect

Headless GIMP: append (or, with filter_id, re-edit in place) one of a small allow-listed set of GEGL effect filters — vignette, black_white, motion_blur, lens_blur, add_noise, drop_shadow, outline, outer_glow, surface_blur — the same non-destructive, re-editable, maskable filter mechanism gimp_add_adjustment uses, sharing the SAME stack: gimp_filter's op=list/set_visibility/delete manage this tool's filters exactly as it manages gimp_add_adjustment's. `type` picks the effect; a field another effect uses is refused, naming this type's own fields. A filter applies to ONE layer (`layer_id` or…

gimp_filter

Headless GIMP: manage the live filter stack: op list | set_visibility | delete. `delete` permanently removes that filter, or every filter in `filter_ids` (there is no undo). No `apply` op — creating or re-editing a filter is gimp_add_adjustment's job; this tool only inspects or manages what already exists. No `reorder` (GIMP has no API for it) — delete and re-create in the desired order instead. `list` is the way to check what a stack of gimp_add_adjustment calls actually produced, and to find a filter's id for a re-edit.

ParameterTypeDescription
image *integerImage id, as returned by gimp_open_document.
op *string'list' returns every filter on the image (including filters on layers inside groups), top of stack first, with layer/layer_id (which layer the filter lives on, and that layer's id), id/name/operation/…
filter_idintegerRequired for set_visibility, and for delete unless `filter_ids` is given.
filter_idsarraydelete only: several filter ids to delete in one call (instead of `filter_id`). Every id is checked first: an unknown or repeated one refuses the whole call, and nothing is deleted.
visiblebooleanRequired for set_visibility.

gimp_crop_document

Headless GIMP: crop the canvas to an explicit rectangle (left, top, width, height in document pixels) — not a scale (that is gimp_resize_image). IRREVERSIBLE in this session: there is no undo, so gimp_checkpoint (or gimp_save_xcf) first when in doubt. Every live filter, mask channel, and the filter ledger survive a crop — verified live; it is the one geometry op that never refuses for masked-filter safety.

ParameterTypeDescription
height *numberNew canvas height, in pixels.
image *integerImage id, as returned by gimp_open_document.
left *numberLeft edge of the new canvas, in document pixels.
top *numberTop edge of the new canvas, in document pixels.
width *numberNew canvas width, in pixels.

gimp_resize_image

Headless GIMP: scale the whole image up or down — not a crop (that is gimp_crop_document). Give width+height to stretch to an exact box, one alone to keep aspect, or long_edge to scale by the longer side. IRREVERSIBLE in this session: there is no undo, so gimp_checkpoint (or gimp_save_xcf) first when in doubt. REFUSES outright when the image has a masked filter, or any filter not created by Editmamei (for example one added in the GIMP GUI) — resize before adding any masked filter, not after. A large target (the bridge allows up to 250 megapixels / 30000px per side) can take tens of seconds…

ParameterTypeDescription
image *integerImage id, as returned by gimp_open_document.
heightintegerTarget height, px. See width.
long_edgeintegerScale so the longer side lands here, preserving aspect. Use this OR width/height.
widthintegerTarget width, px. With height, stretches to exactly that box. Alone, height is derived to keep aspect. Capped at 30000 px/side and 250 MP total (the bridge's DoS floor).

gimp_transform_canvas

Headless GIMP: op 'rotate' (arbitrary `degrees` — straighten — plus `expand`) | 'flip' (`orientation` horizontal/vertical). IRREVERSIBLE in this session: there is no undo, so gimp_checkpoint (or gimp_save_xcf) first when in doubt. REFUSES outright when the image has a masked filter, or any filter not created by Editmamei (for example one added in the GIMP GUI) — straighten/flip before adding any masked filter, not after (crop is the one geometry op that is always safe afterward). A rotate to anything other than an exact 0/90/180/270 degrees is also refused while a position/direction-depe…

ParameterTypeDescription
image *integerImage id, as returned by gimp_open_document.
op *string'rotate' takes an arbitrary `degrees` (straighten) + `expand`. 'flip' takes `orientation`.
degreesnumberrotate only. Arbitrary angle (straighten), not limited to 90° multiples. Positive rotates clockwise.
expandbooleanrotate only. Resize the canvas to the rotated content's new bounds (like Photoshop's "reveal all"). Without it, rotated content can fall outside the original canvas and be cropped.
orientationstringflip only.

gimp_get_preview

Headless GIMP: render the image with live filters applied and return it as a JPEG so you can look at it — fast (~0.25-0.45s at 1024px). Also always refreshes the latest-preview.jpg file in the session folder (the headless session has no visible window; this is how a human follows along). Previews are ~96% of returned bytes — prefer gimp_get_histogram for a parametric check (did the tone actually move?) and reach for this one for spatial questions. `region` renders a full-resolution crop instead of the whole-image proxy — exact for spatial filters rather than approximate. Respects privacy…

ParameterTypeDescription
image *integerImage id, as returned by gimp_open_document.
max_pxintegerLong-edge cap for the proxy render, in pixels.
regionobjectA rectangle in document pixels: {x, y, width, height}. Must lie entirely within the image — a region partly or fully outside it is refused rather than silently clamped. When given, renders a full-re…

gimp_get_histogram

Headless GIMP: statistics for several channels from ONE render: mean, median, 1st/5th/95th/99th percentiles, and a 256-bin histogram per channel (`bins[v]` = pixel count at value v, 0-255). luminance uses babl's D50 perceptual weights. Default is fast (~0.3s, the 1024px proxy render) — good for iterating, but small clipped highlights can be under-counted; pass exact: true (~4s on 24MP) as the final clipping check before gimp_export.

ParameterTypeDescription
image *integerImage id, as returned by gimp_open_document.
channelsarrayDefault: all four (luminance, red, green, blue) in ONE render.
exactbooleanfalse (default): computed on the 1024px proxy render (~0.3s) — good for iterating, but small clipped highlights can be under-counted. true: full-resolution composite (~4s on 24MP) — the trustworth…
maskstringThe name of a selection channel: measure only the pixels it selects at 50% or more (a hard cut, no partial credit for soft edges), e.g. the mean lightness or color of a selected object. Combines with…
regionobjectA rectangle in document pixels: {x, y, width, height}. Must lie entirely within the image — a region partly or fully outside it is refused rather than silently clamped. Computed on the proxy when it…

gimp_compare

Headless GIMP: mode='before_after': proxy base (no filters) vs proxy+filters — whole image or a `region` — per-channel mean/percentile deltas, optionally with paired before/after preview images (include_previews). Previews are subject to privacy.send_previews_to_llm — when it's false, no image is returned even with include_previews:true, and the result text says so explicitly. mode='regions': stats for two named rectangles on the current (filtered) image — the gimp_* twin of ps_compare_regions.

ParameterTypeDescription
image *integerImage id, as returned by gimp_open_document.
mode *string'before_after': proxy base (no filters) vs proxy+filters, whole-image or `region` — per-channel stat deltas. 'regions': two rects on the SAME (filtered) image, stats for each, no delta (compare them…
channelsarrayDefault: all four.
include_previewsbooleanbefore_after only. Also return paired before/after preview images (subject to privacy.send_previews_to_llm, same as gimp_get_preview).
max_pxintegerbefore_after only. Long-edge cap for the proxy render, in pixels.
regionobjectbefore_after only. Restricts the comparison to this rectangle; default whole image.
region_aobjectregions only. First rectangle.
region_bobjectregions only. Second rectangle.

gimp_checkpoint

Headless GIMP: disk-backed checkpoints — the substitute for undo in a session that has none. op=create exports the image's CURRENT state, every live filter included, to a snapshot file and returns a checkpoint_id. op=restore reopens that snapshot as a NEW image and closes the old one — replace semantics, not a copy: the old image id stops working once the close succeeds (if it fails instead — reported as close_failed: true — the old image stays open, and both ids are valid). It returns the new image id and says so plainly, e.g. "image N closed; restored as image M — use M from now on…

ParameterTypeDescription
op *string'create' exports the image's current state — every live filter included — to a disk-backed snapshot and returns a checkpoint_id. 'restore' reopens that snapshot as a NEW image and closes the old o…
checkpoint_idstringRequired for restore / delete. The id create (or a prior list) reported for this checkpoint.
imageintegerImage id, as returned by gimp_open_document. Required for create. Optional for list (omit to list checkpoints for every image).

gimp_layer

Headless GIMP: layer management. op: create | create_group | delete | duplicate | select | set | reorder | merge_down | flatten (a group is created, addressed, and reordered the same as any other layer — there is no separate group tool). Addressed by layer_id (canonical — an id from gimp_inspect or a prior gimp_layer/gimp_bake result) or layer (name; GIMP allows duplicate names, so layer_id is the only handle that always tells two apart). Every op except select changes pixels or layer structure, and there is no undo in this session: gimp_checkpoint or gimp_save_xcf first when in doubt. dup…

ParameterTypeDescription
image *integerImage id, as returned by gimp_open_document.
op *string'create' adds a new, empty layer (width/height default to the image size, capped the same way gimp_resize_image's target is; fill white/black/transparent, default transparent). 'create_group' adds a g…
blend_spacestringset only. The color space this layer blends and composites in (sets GIMP's composite space, and its blend space where the mode has one to set); works on groups too. perceptual matches how browsers and…
discard_hiddenbooleanflatten only. Without it, flatten REFUSES when any layer is hidden (naming them) rather than silently discarding them — pass true to proceed; the discarded layers are reported back as discarded_hidd…
fillstringcreate only. The new layer's initial content.
heightintegercreate only. Defaults to the image height.
layerstringLayer name. Defaults to the selected layer, or the topmost layer if none is selected. Ignored when layer_id is given. Not used by create, create_group, or flatten.
layer_idintegerCanonical layer id (from gimp_inspect or a prior gimp_layer/gimp_bake result) — takes priority over `layer` (name) when both are given, and is the only way to address two layers that happen to share…
modestringset only. A fixed blend-mode list, not a raw GEGL/GIMP mode name.
namestringcreate/create_group: the new layer's name (default 'Layer'/'Group'). set: renames the target layer; may not be empty. Every case enforces a unique name, suffixing " 2", " 3", ... if the name is alread…
opacitynumberset only.
parent_groupintegercreate/create_group: the group layer_id to insert the new layer into (omit for top-level). reorder: the group layer_id to move the layer into. Must itself be a group, and cannot be the layer being mov…
positionintegercreate/create_group/reorder: index within the target parent's (or top-level) stack, 0 = topmost.
to_top_levelbooleanreorder only. Moves the layer to the top level, out of whatever group (if any) it is currently in. Takes priority over parent_group if both are given.
visiblebooleanset only.
widthintegercreate only. Defaults to the image width.

gimp_bake

Headless GIMP: bake a layer's live filters into its own pixels without merging it into anything else — the layer survives as itself, just with no more re-editable filters; a text layer stays a text layer (baking never rasterizes one). A masked filter's confinement survives the bake exactly. Defaults to the selected layer, or the topmost layer if none is selected, the same as any other gimp_layer addressing. Baking clears any masked-filter refusal (gimp_canvas, gimp_resize_image, gimp_transform_canvas) that filter would otherwise trigger — it is the sanctioned way to make a masked adjustmen…

ParameterTypeDescription
image *integerImage id, as returned by gimp_open_document.
allbooleanBake every layer on the image that has any live filter, instead of just one. A group layer is always skipped even when it carries its own filter (GIMP cannot merge filters on a group item) — any suc…
layerstringLayer name. Defaults to the selected layer, or the topmost layer if none is selected. Ignored when layer_id or all is given.
layer_idintegerCanonical layer id. Takes priority over `layer`. Ignored when `all` is given.

gimp_transform_layer

Headless GIMP: transform the active layer (layer/layer_id) — op selects fit|scale|move|rotate|flip|skew|free, each documented on op. Rotate/skew/free grow the layer so nothing clips; a layer with no alpha gets one (alpha_added). REFUSES when the layer, or a group target's descendants, carries a masked filter, or an unmasked effect this transform cannot keep locked to the content.

ParameterTypeDescription
image *integerImage id, as returned by gimp_open_document.
op *string'fit' scales the layer to fit (letterbox) or fill (cover) the canvas, preserving aspect, and centers it (mode fit|fill, idempotent). 'scale' is uniform (scale_percent) or non-uniform (scale_x_percent/…
absoluteobjectA document-pixel point: {x, y}. move, ABSOLUTE mode: target for the layer's top-left corner. Mutually exclusive with delta/center_on.
axisstringflip only. 'horizontal' mirrors left-right; 'vertical' mirrors top-bottom.
center_onobjectA document-pixel point: {x, y}. move, CENTER mode: target for the layer's center point. Mutually exclusive with delta/absolute.
degreesnumberrotate: relative rotation angle, positive clockwise, around the layer's own center. free: relative rotation angle (default 0), applied in the same combined matrix as the scale and offset.
deltaobjectA document-pixel point: {x, y}. move, RELATIVE mode: offset from the layer's current top-left. Mutually exclusive with absolute/center_on.
interpolationstringResampling filter for this call, every op. Always set explicitly here — never carried over from a previous gimp_transform_layer call.
layerstringLayer name. Defaults to the selected layer, or the topmost layer if none is selected. Ignored when layer_id is given.
layer_idintegerLayer 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.
modestringfit only. 'fit' letterboxes the whole layer inside the canvas; 'fill' covers the canvas (overflow is left outside the canvas, not cropped). Defaults to 'fit'.
offset_xnumberfree only. Horizontal translation in document pixels, applied last. Defaults to 0.
offset_ynumberfree only. Vertical translation in document pixels, applied last. Defaults to 0.
scale_percentnumberscale only. Uniform scale percentage (100 = unchanged). 1..10000.
scale_x_percentnumberscale/free: horizontal scale percentage (100 = unchanged), 1..10000. scale: pair with scale_y_percent for non-uniform stretch/squash; the other axis defaults to scale_percent, or 100 if that is absent…
scale_y_percentnumberscale/free: vertical scale percentage. See scale_x_percent.
skew_h_degreesnumberskew only. Horizontal slant angle in degrees — positive slants the top edge right. At least one of skew_h_degrees/skew_v_degrees is required.
skew_v_degreesnumberskew only. Vertical slant angle in degrees — positive slants the left edge down.

gimp_create_document

Headless GIMP: create a new, empty image from scratch — not from a file (that is gimp_open_document). width/height, mode (rgb/grayscale, default rgb), fill for the single background layer (white/black/transparent, default white), optional precision (16/32-bit, same promotion gimp_open_document's own `precision` does) and name. Returns the exact same shape gimp_open_document does (image id, dimensions, base type, precision, layer list), so every other gimp_* tool treats it identically to an opened file.

ParameterTypeDescription
height *integerCanvas height, in pixels.
width *integerCanvas width, in pixels.
fillstringThe single background layer's initial content.
modestringThe new image's base color mode.
namestringThe background layer's name. Defaults to 'Background'.
precisionstringPromote bit depth at creation, same as gimp_open_document's own `precision` — use this ahead of an aggressive tone move to avoid visible banding. Omit for ordinary 8-bit. The megapixel cap this tool…

gimp_place_image

Headless GIMP: load another image file as a new layer in an already-open document — compositing, not opening a second document. Absolute file_path, same format support and raw-file handling as gimp_open_document. If the source has multiple layers (e.g. a `.xcf`), only ONE of them is placed — GIMP's own choice, not a flattened composite of the whole file. A source whose color mode (RGB/grayscale) differs from this image's own is converted automatically on load, never refused. x/y place the layer at an ABSOLUTE document-pixel offset (not a delta), default (0, 0); width/height optionally scal…

ParameterTypeDescription
file_path *stringAbsolute path to an image file to load as a new layer — same format support and raw-file handling as gimp_open_document's own `file_path`. If the file has multiple layers (e.g. a `.xcf`), only ONE o…
image *integerImage id, as returned by gimp_open_document.
heightintegerScale the placed layer to this height. See width.
namestringThe new layer's name. Defaults to the source file's own base filename. Every case enforces a unique name, suffixing " 2", " 3", ... if the name is already taken.
parent_groupintegerThe group layer_id to insert the new layer into (omit for top-level).
positionintegerIndex within the target parent's (or top-level) stack, 0 = topmost.
widthintegerScale the placed layer to this width. With height, stretches to exactly that box. Alone, height is derived to keep the source file's own aspect ratio. Omit both to place at the source file's natural s…
xintegerThe new layer's ABSOLUTE horizontal offset in document pixels (not a delta).
yintegerThe new layer's ABSOLUTE vertical offset in document pixels (not a delta).

gimp_canvas

Headless GIMP: extend the canvas — grow it and reposition the existing content within the larger frame, never shrink (use gimp_crop_document for that; REFUSED outright when either dimension would be smaller than the current one, and REFUSED when neither dimension actually grows). Choose where the existing content lands with `anchor` (a 3x3 grid, default 'center') or explicit offset_x/offset_y; give one or the other, not both. `fill` sets a solid backdrop layer under the WHOLE canvas — white, black, a '#rrggbb' hex color (rendered as luminance on a grayscale image), or transparent (default,…

ParameterTypeDescription
height *integerNew canvas height, in pixels. Must be at least the current height. See width.
image *integerImage id, as returned by gimp_open_document.
width *integerNew canvas width, in pixels. Must be at least the current width, and at least one of width/height must actually be LARGER than the current size (both equal to the current size is refused — there is…
anchorstringWhere the existing content sits within the new, larger canvas — a 3x3 grid, same as Photoshop's Canvas Size anchor picker. Defaults to 'center' when neither this nor offset_x/offset_y is given. Mutu…
fillstring'white', 'black', a '#rrggbb' hex color, or 'transparent' (default — no fill layer is added at all; see the note on gimp_export/flatten below). Any other choice is painted onto a new, full-canvas la…
offset_xintegerExplicit horizontal offset (document pixels) for the existing content's left edge in the new canvas, instead of an anchor — must be between 0 and (new width - current width). Requires offset_y too;…
offset_yintegerExplicit vertical offset for the existing content's top edge, instead of an anchor — must be between 0 and (new height - current height). Requires offset_x too; mutually exclusive with anchor.

gimp_convert_image_mode

Headless GIMP: convert the image's base color mode, rgb <-> grayscale — an indexed image is refused outright as a source. Converting to grayscale permanently discards color; converting an already-grayscale image to rgb does not restore it. A no-op when the image is already the requested mode (reported as converted: false, nothing else changes — checked BEFORE the live-filter refusal below, so a no-op call never fails just because a filter happens to be present). Otherwise REFUSES outright while the image has ANY live filter — a color-dependent filter (curves on the red channel, hue_satur…

ParameterTypeDescription
image *integerImage id, as returned by gimp_open_document.
mode *stringTarget base color mode. An indexed source image is refused outright.

gimp_text

Headless GIMP: create a live, editable text layer or restyle one, chosen with `op` (create, set_content, set_font, set_color, set_alignment, set_box) — the same ops and parameters as ps_text, plus a fixed `box` with wrapping and `fit`. create adds a layer at `x`/`y` with `text`, `font_size` in points, and optional font_name, red/green/blue and alignment; it reports layer_id, name, bounds, the image ppi and the font size in pixels. The set_* ops change the text layer named by `layer_id` or `layer` (a non-text layer is refused). Fonts accept a family ("Inter") or full name ("Inter Bold"), case…

ParameterTypeDescription
image *integerImage id, as returned by gimp_open_document.
op *stringcreate: a new text layer at the top of the stack with `text` at `x`/`y` (default 100,100) and `font_size` (default 24), optionally with font_name, red/green/blue and alignment. set_content: replace th…
alignmentstringText alignment. GIMP supports LEFT, CENTER, RIGHT and FULLYJUSTIFIED; the other values ps_text accepts (LEFTJUSTIFIED, CENTERJUSTIFIED, RIGHTJUSTIFIED) are refused. In a box, alignment applies within…
blueintegerText colour blue, 0-255.
boxobjectcreate, set_box: a fixed text box {width, height?} in image pixels (each side 1 to 30000, area within the text-box cap: 64 MP at 8-bit, 32 MP at 16-bit, 16 MP at 32-bit). The text wraps at `width` (ne…
fitbooleancreate, set_box: with a `box` that has both width and height (at most 16 MP), shrink the text to approximately the largest size (at most font_size, or the current size for set_box) at which the wrappe…
font_namestringFont family ("Inter", "Open Sans") or full name ("Inter Bold"), case-insensitive. create: omit for a default sans. A name that matches nothing is refused with the closest installed names; gimp_inspect…
font_sizenumberFont size in points, 1 to 1296, converted to pixels with the image resolution. create: initial size (default 24). set_font: new size (omit to keep the current size).
greenintegerText colour green, 0-255.
layerstringset_*: name of the text layer to change. Ignored when layer_id is given. Not used by create.
layer_idintegerset_*: id of the text layer to change (create reports it; gimp_inspect flags text layers with is_text_layer). Takes priority over `layer`. Not used by create.
min_sizenumberfit only: the smallest font size to try, in pixels (default 8).
redintegerText colour red, 0-255. red, green and blue go together.
textstringcreate: initial text. set_content: the new text, replacing the existing text. At most 2000 characters. For a line break, put a newline character in the string (not a backslash followed by n).
xintegercreate only: the layer's left edge in document pixels.
yintegercreate only: the layer's top edge in document pixels.

gimp_select

Headless GIMP: make a selection, saved as a NAMED channel (no live selection persists between calls): rectangle/ellipse/polygon/colour range/magic wand/layer alpha/gradient/another channel. Combine add/subtract/intersect by reusing a name. Use the channel as gimp_add_adjustment's `mask` when creating a filter, or gimp_layer_mask for a real layer mask. Make selections after straighten/resize/crop.

ParameterTypeDescription
image *integerImage id, as returned by gimp_open_document.
mode *stringrectangle/ellipse: x, y, width, height. polygon: points (>=3 [x,y] pairs). color_range: every pixel near `color` (hex) or the colour at a sample point x,y, anywhere in the image. magic_wand: the conti…
colorstringcolor_range: a hex colour like "#c0392b".
combinestringCombine with the existing saved selection of the same `name` (like shift/alt in a GUI). `invert`/`feather_px` apply to the NEW shape alone, before it is combined.
cxnumbergradient_radial: center x, document pixels. Default the image's own center.
cynumbergradient_radial: center y, document pixels. Default the image's own center.
feather_pxnumberFeather radius in document pixels, applied to the NEW shape alone before any `combine`. Refused (nonzero) on gradient_linear/gradient_radial -- already a continuous ramp, nothing to feather.
heightnumberrectangle/ellipse: height, document pixels.
invertbooleanApplied to the NEW shape alone, before any `combine`. rectangle/ellipse/polygon/color_range/magic_wand/alpha/channel: invert the selection. gradient_linear/gradient_radial: swap which end is black vs…
layerstringLayer name. Defaults to the selected layer, or the topmost layer if none is selected. alpha: which layer. color_range/magic_wand: only matters when sample_merged:false (otherwise the visible composite…
layer_idintegerLayer 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. alpha: which layer. color_ran…
namestringChannel to save the selection in (replaced).
pointsarraypolygon: 3-10,000 [x, y] pairs, document pixels.
radiusnumbergradient_radial: radius, document pixels. Default half the shorter image side.
sample_mergedbooleancolor_range/magic_wand: sample the visible composite. false samples the one named/selected layer's own raw pixels instead.
sourcestringmode=channel: the saved selection to copy.
thresholdnumbercolor_range/magic_wand tolerance, 0-255.
widthnumberrectangle/ellipse: width, document pixels.
xnumberrectangle/ellipse/magic_wand, or color_range's sample point: left edge or point x, in image pixels from the canvas origin, also when `layer` names a layer that sits at an offset (never counted from th…
x1numbergradient_linear: start point x, document pixels. Default 0.
x2numbergradient_linear: end point x, document pixels. Default the image's width.
ynumberrectangle/ellipse/magic_wand, or color_range's sample point: top edge or point y, in image pixels from the canvas origin, also when `layer` names a layer that sits at an offset (never counted from tha…
y1numbergradient_linear: start point y, document pixels. Default 0.
y2numbergradient_linear: end point y, document pixels. Default 0.

gimp_modify_selection

Headless GIMP: expand, contract, border, feather, smooth, invert, harden or delete a saved selection. Refused if the target channel already confines a filter.

ParameterTypeDescription
channel *stringThe saved selection to modify.
image *integerImage id, as returned by gimp_open_document.
op *stringexpand/contract/border/feather require `px` (> 0). harden: threshold a soft mask at 50%. smooth: round off jagged edges (`px` optional, floors at 1px). delete: remove the saved selection (no `px` or `…
outputstringWrite to this saved selection instead of modifying `channel` in place.
pxnumberRadius in document pixels, rounded to the nearest whole pixel. Required (> 0) for expand/contract/border/feather; optional for smooth; unused otherwise. expand/contract/border cap at 150 on an ordinar…

gimp_layer_mask

Headless GIMP: a real layer mask (moves with the layer). create from a saved selection (e.g. from gimp_select) or white/black/alpha/grayscale; delete; apply (bake into alpha — a cut-out); invert. For a cut-out composite: place the photo as a layer, select on that layer, then create its mask from the channel.

ParameterTypeDescription
image *integerImage id, as returned by gimp_open_document.
op *stringcreate replaces any existing mask. apply bakes the mask into the layer's alpha.
channelstringsource=channel: the saved selection to use.
invertbooleancreate: invert the new mask.
layerstringLayer name. Defaults to the selected layer, or the topmost layer if none is selected.
layer_idintegerLayer 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.
sourcestringcreate: where the mask comes from.

gimp_get_selection_preview

Headless GIMP: see a saved selection — overlay (red over what is NOT selected, Quick Mask style) or the mask itself. Always check a selection before using it. Respects privacy.send_previews_to_llm: when disabled, no image bytes are returned, only the dimensions.

ParameterTypeDescription
channel *stringThe saved selection to show.
image *integerImage id, as returned by gimp_open_document.
max_pxintegerLong-edge cap for the proxy render, in pixels.
stylestringoverlay: the image with red over what is NOT selected. mask: white = selected.

ps_report_problem

Collect an ANONYMIZED diagnostic bundle and write it to the user's Downloads folder so they can attach it to a bug report — use when Editmamei misbehaves (won't connect, a tool keeps failing, unexpected results). The bundle holds recent server logs, system info (Editmamei/OS/Photoshop versions), and a content-free summary of recent tool calls (name, success, duration, error class). It contains NO image content, the tool-call summary carries NO tool arguments, and file paths are reduced to basenames; log lines can still quote a layer name or a value from an error message. Does not touch Photo…

ParameterTypeDescription
notestringOptional short description of the problem (what went wrong, what you were doing). Embedded verbatim after sanitization. No file contents or paths needed.