atelier tool reference

30 tools — every one advertised, no profiles. Generated from the live registry; do not edit by hand.

delete_doc

Delete a document and all its files.

doc_id

doc_add_tag

Add an animation tag (named frame range). direction: forward/reverse/pingpong.

direction doc_id from name to

doc_anim_audit

Audit an animation loop. mode="seam" diffs the wrap the loop actually plays and returns seam_score = changed/opaque plus the change_bbox naming WHERE the loop pops (an EFFECT that fades to nothing scores ~1.0 by construction — for FX judge the absolute pixel count, not the ratio). mode="spacing" tracks the opaque-mass CENTROID per played frame (per_frame_center/offset, total_drift, evenness; 0 = mechanically even); pass `region` to isolate one part (a swinging arm) over a static body. mode="arc" returns the centroid trajectory, arc_residual (~0 = mechanical straight slide; higher = proper arc) and volume_cv (~0 = constant mass). mode="timing" returns per-frame durations and flags uniform timing (reads mechanical — hold contacts ~1.5x). `tag` audits one tag (omit = whole timeline).

doc_id layer mode region tag

doc_batch

Apply MANY ordered drawing ops to one cel in a single call (fast headless editing) — and optionally to several frames at once: `frames` applies the same op list to each listed frame (repeated fixes on a static layer are ONE call). Each op is an object {"op":"<name>", ...} taking the same fields as the matching doc_draw/doc_fx op. Draw: pencil|line|rect|ellipse|polyline|polygon|stroke|curve|stamp|fill|bucket|gradient|scatter|noise|text|fill_cel|clear_cel. FX: blur|outline|drop_shadow|bevel|shade|form|dither|pixel_perfect|flip|shift|rotate|scale|symmetry|quantize|replace_color|adjust|gradient_map. Plus glow (batch only; params color?, radius?, intensity?, mode?). Add per-op "opacity" (0..255) and/or "blend_mode" to composite that op instead of overwriting, or "erase": true to make the op an ERASER (every pixel it touches goes transparent — any shape can punch a hole). Honours an active doc_select.

doc_id frame frames layer ops

doc_checkpoint

Document history for an all-destructive editor. action: save (snapshot the doc) | list | restore (roll back) | diff (regression deltas vs a snapshot: pixel/colour/contrast change, added/removed/recoloured) | prune. Snapshot before a risky op (form/quantize/fill/palette snap) and restore if it gets worse.

action checkpoint_id doc_id label

doc_clear_cel

Clear (empty) a layer×frame cel.

doc_id frame layer

doc_components

Connected-component analysis of a frame: each blob's bbox, centroid, area and dominant colour (sorted by area desc, capped 64). `connectivity` 4|8 (default 8); `color` restricts to that exact colour (omit = any opaque); `min_area` filters the list. Stray 1–2px `specks` are always reported — catches orphan/leftover pixels.

color connectivity doc_id frame layer min_area

doc_contact_sheet

Every frame in ONE labelled inline grid (index + duration) — the animator's flip-test the agent can't otherwise do. onion=true ghosts each cell's previous frame under it (per-pair onion skin — judge spacing/overlap/popping from a single image). cols sets the grid width; scale upscales each frame.

cols doc_id onion scale

doc_create

Create an editable document (layered canvas + timeline). Returns its id + structure.

height name width

doc_critique

Art-director scorecard: the named pixel-art failure modes the agent can't see — orphan specks, un-AA'd jaggies (outer step corners), low contrast, per-form pillow-shading and mixed light direction, value-soup massing, and off-palette drift. Verdicts are conservative (ok|warn|info) with worst-offending cells so you can fix locally. Snapshot with doc_checkpoint first if acting on it.

doc_id frame layer region

doc_dither_ramp

Graduated multi-tone dithering across a whole RAMP along an axis (h|v|radial) — master gradient shading, vs the two-colour `dither`. pattern bayer2/4/8 | checker | ign (blue-noise, no visible matrix grid). only_existing repaints just opaque pixels (shade existing art, keep alpha). Honours an active selection. Snap afterwards with doc_palette op=snap if it drifts.

axis doc_id frame layer only_existing pattern ramp region

doc_draw

Draw ONE shape/mark on a cel — the single-op form of doc_batch (use doc_batch for many ops at once). `op` plus its flattened params: pencil{points,color,size?} (each point is a SEPARATE dab — use polyline or line to CONNECT points into a stroke) · line{x0,y0,x1,y1,color,size?} · rect{x0,y0,x1,y1,color,fill?,size?} · ellipse{cx,cy,rx,ry,color,fill?} · polyline{points,color,size?,closed?} · polygon{points,color,fill?} · stroke{points,color,width?,aa?,snap?} (aa=true softens edges with PARTIAL-ALPHA pixels — set aa=false on a locked palette or before a GIF export, whose alpha is 1-bit) · curve{points,color,width?,aa?,snap?} (a bezier through the control points — the stroke op, curved) · stamp{points,tip,colorize?} (a custom brush: tip is {w,h,pixels:[[r,g,b,a],…]} stamped centred on each point; colorize tints it) · fill{x,y,color,tolerance?} · gradient{stops,kind?,x0,y0,x1,y1,…} · scatter{colors,x0,y0,x1,y1,density?,seed?,size?} · noise{stops,x0,y0,x1,y1,kind?,scale?,…} · text{x,y,text,color,size?} · fill_cel{color} · box_iso{cx,cy,s,ht,color,light_right?} (shaded isometric cuboid — the hard-surface form primitive: crates, blocks, dice) · panel{x,y,w,h,fill,border?,bevel?} (HUD/UI box: filled body + border + inner bevel; pair with op=text for labels). All also accept opacity, blend_mode, and erase (true = the shape ERASES to transparent instead of drawing). Honours an active doc_select.

doc_id frame layer op

doc_dump_region

Dump a region of a frame as a text grid so you can read exact pixels blind. mode="symbol" maps each distinct colour to a glyph (A..Z a..z 0..9) with a legend, `.`=transparent; mode="hex" emits #rrggbb(aa)/`.` tokens. `layer` dumps one cel (omit = flattened). `region` [x0,y0,x1,y1] caps at 4096 px — crop large canvases.

doc_id frame layer mode region

doc_export

Export to a file. Per-document `op`: sheet (horizontal spritesheet PNG + JSON meta — rects/durations/tags/palette; `meta`=standard writes the industry-standard hash sprite-JSON engines' existing importers parse instead) · anim (animated `format`=gif|apng, optional `tag` plays that animation in its direction) · tileset (slice a `tile_w`×`tile_h` grid → PNG + Tiled .tsx + JSON; canvas must divide evenly). Library-wide `op` (omit doc_id): all (one spritesheet PNG + JSON per document into `out_path` as a DIRECTORY) · atlas (pack EVERY frame of EVERY document into one atlas PNG + master JSON map — doc/frame/rect/duration — for slicing a whole game from one texture; `max_width` wraps the shelf packer, default 512). GIF/APNG alpha is 1-bit: a pixel is fully opaque or fully gone, so animation tuned with partial alpha (aa edges, per-op opacity) will jump at export — snap or flatten first. Shared: out_path, scale (sheet/anim/all/atlas 4, tileset 1).

doc_id op out_path scale

doc_frame

Frame lifecycle + timing in one tool. `op`: add (append a frame; `copy_from` duplicates that frame's cels, `count` appends several at once, `duration_ms` default 100) · duration (set frame `frame`'s `duration_ms`) · insert (new frame at `frame`) · duplicate (`frame`; `link`=true shares the source's cels — copy-on-write — instead of copying) · delete (`frame`; last frame protected) · move (`frame`→`to_index`). Cels reindex and tag ranges remap. (Animation tags have their own tool: doc_add_tag.)

copy_from count doc_id duration_ms frame link op to_index

doc_frame_diff

Diff two frames pixel-by-pixel: returns changed/added/removed/recolored counts and the change_bbox. `layer` diffs one cel (omit = flattened). `region` [x0,y0,x1,y1] restricts the area. grid=true adds a text map (`.`unchanged `+`added `-`removed `~`recolored, area capped 4096 px). render="overlay" returns an INLINE PNG of frame_b dimmed 40% with changed pixels flagged (green=added/red=removed/yellow=recoloured). Inspect what actually moved between animation frames.

doc_id frame_a frame_b grid layer out_path region render scale

doc_fx

Apply ONE transform/effect op that REWORKS existing pixels — the complement of doc_draw (which adds marks), single-op form of doc_batch. `op` plus its flattened params, grouped: **effects** blur{radius,region?} · outline{color,aa?} · drop_shadow{color,dx?,dy?,blur?,shadow_opacity?} · bevel{light,dark,depth?} · shade{light_dir?,steps?,mode?,ramp?,region?} · form{form,light_dir?,ramp?,strength?,region?} · dither{color_a,color_b,pattern?,density?,region?,only_existing?} · pixel_perfect{region?,color?} (thins 1px staircases on OUTLINES/lines — never run it over filled shapes or size>1 strokes, it shreds them); **transform** flip{horizontal?} · shift{dx?,dy?,wrap?} · rotate{turns?} (quarter-turns clockwise about the canvas centre — content clips, canvas never resizes) · scale{w,h,method?} (nearest or area-average; the cel keeps its anchor) · symmetry{vertical?,horizontal?,keep_left?,keep_top?}; **colour** quantize{colors,max_colors?} · replace_color{from,to,tolerance?} · adjust{hue?,sat?,lum?,region?} · gradient_map{stops,region?} (remap luminance through colour stops, alpha kept). All also accept opacity/blend_mode and honour an active doc_select.

doc_id frame layer op

doc_info

Get a document's structure: layers, frames, cels, tags.

doc_id

doc_layer

Layer structure in one tool. `op`: add (new layer on top — name/opacity/blend) · set (change layer `index`'s visible/opacity/blend; omit a field to leave it) · move (`index`→`to_index`) · insert (new layer at `index`) · delete · rename · duplicate · merge_down (`index` onto the layer below). Blend ∈ normal/multiply/screen/add/overlay/soft-light/hard-light/darken/lighten/color-dodge/color-burn/difference/subtract/exclusion.

blend doc_id index name op opacity to_index visible

doc_look

SEE a frame as an INLINE PNG (no separate file read) plus measured stats — the agent's primary and only eye for the canvas. mode: render | value/grayscale | bands | sat | hue | notan (3-value squint). grid + coords burn a pixel ruler into the upscale; onion ghosts neighbours; region crops; max_size makes a thumbnail; tile repeats the result N×N (N ≤ 16) to check seamlessness; bg mattes transparency (checker|dark|white — use it when judging white/light pixels, which vanish on a white viewer backdrop); out_path also writes the PNG to a file. Stats report value min/max/mean/contrast and shadow/mid/light mass % (plus per-band coverage in bands/notan modes).

bands bg coords doc_id frame grid max_size mode onion out_path region scale tile

doc_paint_grid

Paint a whole region DECLARATIVELY from a character grid (the inverse of doc_dump_region): `legend` maps single characters to [r,g,b(,a)] colours or integer PALETTE INDICES, `rows` are pixel-row strings ('.'/' ' leave the pixel untouched). Emitting a sprite as a grid eliminates the absolute-coordinate failure class — prefer this over long pencil/rect sequences for detailed shapes. Verify by diffing against doc_dump_region. Returns painted/clipped counts — call doc_look to SEE the result. Honours an active selection.

doc_id frame layer legend rows x y

doc_palette

The palette hub. `op`: generate (default) — synthesize a cohesive palette in OKLCh: a single shading ramp (scheme="mono") or a multi-hue scheme (complementary|triadic|analogous|split|tetradic); `count` colours per ramp, `hue_shift` warms light/cools shadow, `sat_curve` (flat|arc|sat-in-shadow), `anchor_midtone` pins the base; returns ramps + flat palette + hex + evenness validation; `set_doc` locks it on a doc. set — lock explicit `colors` [[r,g,b(,a)]] on `doc_id`. snap — snap `doc_id`'s cel (or whole doc if layer/frame omitted) to its palette by perceptual nearest; `alpha` policy preserve|opaque|flatten (`cutoff`,`bg`), `palette` overrides. swap — recolour `from`→`to` across `doc_id` (optional layer/frame), updating the stored palette. report — colour-usage tally for `doc_id` (frame/layer/region, `dupe_threshold`). sync — broadcast one `palette` (or `from_doc`'s) across a document set (`ids` and/or `prefix`).

alpha anchor_midtone base bg colors count cutoff doc_id dupe_threshold frame from from_doc hue_shift ids layer op palette prefix region sat_curve scheme set_doc to value_hi value_lo

doc_ref

Reference workflow — recreate-from-sample as a measurable loop. `op`: set — attach the ORIGINAL reference (`path`, omit to clear) so compare/diff can score likeness; returns aspect-true fit suggestions. import — trace a source image cleaned onto a guide layer: `path`, `target_w` (required), optional `target_h`, `colors`, `dither`, `defringe`, `to_doc_palette`, `remove_bg`, `pin`; returns a text report — call doc_look to SEE it. analyze — decompose the reference (inline PNG): background coverage, a frequency-weighted SUBJECT palette to lock with doc_palette op=set, and the silhouette as a text grid; `path` analyzes an external file, `target_w` plans at a size. compare — SCORE a `frame` (run after every pass): inline side-by-side (mode="overlay" ghosts the reference), silhouette IoU (≥0.80 reads), per-cell OKLab ΔE with worst cells as rects, and missing palette colours; `cells` sets the grid. diff — PER-PIXEL signed error map (heat PNG: red=too light, blue=too dark, green=wrong hue) plus the `top` worst pixels each with a fix direction.

cells colors defringe dither doc_id frame layer mode op path pin remove_bg target_h target_w to_doc_palette top

doc_region

Region + clipboard ops on a cel. `op`: copy (rect [x0,y0,x1,y1] → clipboard) · cut (copy + clear) · clear (erase the rect) · move (shift the rect by dx,dy in place) · paste (clipboard at x,y; `blend` source-over by default, false overwrites). Clipboard is cross-document.

blend doc_id dx dy frame layer op x x0 x1 y y0 y1

doc_seam_report

Tiling seam check: wrap-test a frame's far edge against the near edge it abuts when repeated. axis="horizontal" tests left↔right, "vertical" top↔bottom, "both" runs each. Per axis returns {mismatches, max_delta, worst:[[x,y,delta] ≤10]}; any mismatch also returns an INLINE overlay PNG (a directional one-shot effect that fades out will always mismatch its own wrap — that is the effect restarting, not a tiling bug) (frame dimmed, bad edge pixels red) so you see WHERE the seam pops. `threshold` is the max per-channel delta still counted a match (default 0). Verify seamless tiles.

axis doc_id frame layer out_path threshold

doc_select

Set/modify the active pixel selection so subsequent painting ops (fill/gradient/scatter/rect/ellipse/polygon/pencil/line/batch) are confined to it. shape: rect (x0,y0,x1,y1) | ellipse (cx,cy,rx,ry) | polygon/lasso (points [[x,y],…] ≥3, auto-closed) | color (layer,frame + `color` or sample x,y + tolerance) | all | none (clear). mode: replace (default) | add | subtract | intersect.

color cx cy doc_id frame layer mode points rx ry shape tolerance x x0 x1 y y0 y1

doc_silhouette

Opaque-vs-transparent shape report for a frame: tight bbox, fill_ratio (opaque/canvas), and a #/. grid of the whole canvas. `layer` reads one cel (omit = flattened). `alpha_threshold` is the min alpha counted opaque (default 1). Read a sprite's silhouette/readability at a glance.

alpha_threshold doc_id frame layer

doc_slice

Slice metadata on the document — named rects that spritesheet consumers read (UI 9-slice bounds, pivot points), never pixels. `op`: add (`name`, `rect` [x0,y0,x1,y1] inclusive corners; optional 9-slice `center` rect inside it; optional `pivot` [x,y]) · delete (by `name`) · list. Slices ride doc_export op=sheet's JSON sidecars (both the default and the engine-standard meta).

center doc_id name op pivot rect

doc_tile

Stamp tiles from a tileset document onto this cel as a tilemap. `op`: place — `tiles_doc`'s flattened frame 0 is sliced row-major into tile_w×tile_h tiles (index 0 = top-left; the tileset is read-only, never modified), and every [cell_x, cell_y, tile_index] of `cells` lands at pixel (cell_x*tile_w, cell_y*tile_h), source-over, clipped to the canvas (off-canvas cells are skipped, reported in cells_skipped). One call = one tilemap = one journal entry; all args are plain JSON, so replay is byte-identical. Export the tileset itself with doc_export op=tileset.

cells doc_id frame layer op tile_h tile_w tiles_doc

list_docs

List documents (id, name, size, frame/layer counts). Optional `prefix` selects a family by id start (`hero-` matches hero-idle, hero-run); `contains` filters by substring; both = AND. Omit both to list everything.

contains prefix