Chandelier
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| CHANDELIER_LOG | No | Set to `debug` to write one JSON line per tool call (tool, time, result) to stderr. | |
| CHANDELIER_TOOLS | No | Set to `lean` to load the eight build tools plus a `tools` tool (about 4.9 k tokens instead of 16.2 k), or a comma-separated list of tool names to load a custom subset. | |
| CHANDELIER_LOG_FILE | No | Path to a file to which debug log lines are appended. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
chandelier drives Adobe Illustrator on this Mac (~5 ms per call). Conventions: coordinates [x, y, w, h] from the top-left of the active artboard, y down, in points (configure: units mm/in/px, origin, artboard). Colours "cmyk(100,85,30,25)", "gray(60)", "#1e2a44", "swatch:Name", "swatch:Name@50", "gradient:Name@45", "none". Refs (one or a list): uuid, "selection", "name:Glob*", "layer:Name", "artboard:N", "@n" (an earlier batch step). Uuids change when a document is reopened. Load only the tools a job needs (a build: documents, batch or run_script, preview). Fonts match fuzzily; call fonts only when unsure. Build a document (aim for ~8 Illustrator calls; no status call first):
documents new (size, units — they become the session units, bleed, artboards, artboard_names, title).
One batch: swatches (global, one per colour role) + styles (one paragraph style per text role); give every text its paragraph_style, so the file can be restyled.
One batch of create_text / create_shape / create_path with items[] or grid (many objects per step; step artboard for other pages), duplicate_items to_artboards for repeated parts — or one run_script builder (.jsx file + args) when logic is easier in code; start it with AIA.fresh(layer) so a re-run replaces instead of adding.
One check call: preview {reference (when rebuilding from an image), more: [other artboards], preflight: true}; fix what content_box, differences and preflight show (one batch), check once more.
One finish call: documents save {path, export: [{format, path, …}], close: true}. Only touch documents you created or were asked to change; close what you created.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| statusA | Illustrator and server state: running, version, open documents (created_here), session settings, MRAP retries, last_call (finished? created uuids: check it after a timeout), latency. launch:true starts Illustrator if needed (waits up to 2 min). restart:true quits and relaunches it, reopening the open documents (refused while any is unsaved: save or close it first) — for repeated MRAP errors in long sessions. Not needed before other tools (they say if Illustrator is off). |
| configureA | Session settings used by every tool (and by AIA.* helpers in run_script). units: "pt" (default) | "mm" | "in" | "px" for positions and sizes (type sizes and stroke width stay pt). origin: "artboard" (default: top-left of the reference artboard, y grows down) | "document" (y up). artboard: index of the reference artboard (null = the active one). timeout: seconds per call (default 300). activate: front Illustrator before save/export (default true; Windows false). Returns the settings. |
| documentsA | Manage documents. Sizes are in session units (configure) unless "units" is given. action: "list" → open documents "new" (width, height, units? (also becomes the session units), color "cmyk"(default)|"rgb", artboards (count, default 1), columns (grid, default min(n,4)), spacing (gap between trim edges, session units, default 20 pt), bleed, artboard_names[], title) → creates and activates it "open" (path) → opens or activates a file "activate" (name) "save"|"save_as" (name? default active; path → save as, format from .ai|.pdf|.eps|.svg or "format"; pdf_preset?; export: [{format, path, artboards: [i]|"all", …export args}] and close:true → save, export, close in one call (not in batch)) "close" (name? default active; unsaved changes need save:true or discard:true) → also lists the documents still open |
| document_infoB | Compact summary of a document (default: active): colour space, bleed (session units, source xmp|file|unknown), artboards (rect [x,y,w,h] in session coordinates), layers (item counts, hidden/non-printing/locked), counts by type, global swatches with their colours, spot colours, paragraph/character styles, fonts used (text frames per font), selection count, and issues (RGB in CMYK, empty text, empty groups, unnamed text outside named groups, overset area text, unstyled text = frames left on the default paragraph style when the document has its own styles). checks:false skips the slow checks. |
| find_itemsA | Find items in the active document (all depths) in one pass. All filters are optional and combine (AND): type (one or an array), name (glob: * and ?), text (substring of text contents, case-insensitive), font (substring of the PostScript or "Family Style" name), size (font size, or [min,max]), fill / stroke (colour), layer (name, includes sublayers), in (ref of a layer or group), artboard (index: touching it), within ([x,y,w,h]: touching it), top_level (direct children of layers only), hidden / locked / selected (booleans), guides (true = only guides, false = no guides). Returns {total, by_type, items:[…fields], more?}. fields default ["uuid","type","name","box"]; also: layer, parent, text, font, size, fill, stroke, sw, opacity, hidden, locked, selected, artboard. limit default 50, offset for paging, count_only for just the counts. |
| get_itemsA | Full detail of items by refs: box (visible) and geo (geometric) [x,y,w,h], layer, parent, opacity, blend, hidden/locked; paths: closed, points count, area, fill, stroke, sw, dash, cap, join, clipping (+ "path": points with in/out handles if points:true); text: kind (point/area/path), contents, anchor (baseline start of point text), lines, align, paragraph_style, runs [{text, font, size, fill, leading, tracking}] (runs:false to skip); groups: items, clipped; placed: file (missing_link); symbols: symbol. limit default 100. |
| get_treeA | Outline of the active document: layers → sublayers → groups → items, as {tree:[{layer, count, sublayers?, children:[{type, uuid, name, text?, count?, children?}]}], note?}. root: "layer:Name" or a group ref (default all layers). depth default 2; limit = children shown per container (default 50, then {more:N}); max_nodes = items in the whole answer (default 300). boxes:true adds [x,y,w,h]. Within a layer, sublayers are listed apart from items. |
| selectionA | Read or change the selection in the active document. action: "get" (default) | "set" (refs) | "add" (refs) | "remove" (refs) | "clear" | "all" (top-level items; or only those on layer / artboard). Locked and hidden items are skipped (with a warning). Returns {count, items:[…fields]} (fields as in find_items, default uuid/type/name/box; limit default 50). |
| create_shapeB | Create shapes. rect / rounded_rect (r) / ellipse / polygon (sides) / star (points, inner) take a box x, y, w, h (top-left; polygon and star are inscribed in it); line takes x1, y1, x2, y2. Default paint: no fill + 1 pt black stroke when neither fill nor stroke is given (lines: black stroke). Appearance: fill, stroke (colour or "none"), stroke_width (pt), dash (pt; [] = solid), cap, join, opacity, blend, graphic_style (applied first); name, note, hidden, locked. Placement: layer (name, created if missing) or parent (group ref / "layer:Name"); default the active layer. Many at once: items:[{…}, …] — each item's props override the shared ones given at the top level (e.g. shared fill, per-item x/y). Returns {count, items:[{uuid, name, type, box}]}. |
| create_pathA | Create a path from points, several point lists (compound path), or SVG path data "d" (SVG y-down units = session units; scale and x, y offset them — so an SVG icon can be dropped in at any size). Default paint when neither fill nor stroke is given: closed → black fill, open → 1 pt black stroke. Appearance: fill, stroke (colour or "none"), stroke_width (pt), dash (pt; [] = solid), cap, join, opacity, blend, graphic_style (applied first); name, note, hidden, locked. Placement: layer or parent. Many at once: items:[{…}]. Returns {count, items:[{uuid, name, type, box}]}. |
| create_textA | Create text frames. Atomic: if styling fails the frame is removed. point (x, y; y = first BASELINE unless y_ref:"top"; align left|center|right anchors at x) · area (x, y, w, h; reports overset) · path (on_path = a path ref; keep_path copies it). kind defaults from the props given. Character: font (fuzzy), size, fill/color, stroke, leading, tracking, baseline_shift, underline, strikethrough, caps, horizontal_scale, character_style. Paragraph: align, paragraph_style, space_before/after, indents, hyphenation (sizes in pt). Placement: layer or parent. Many at once: items:[{text, x, y, …}] with shared props at the top level, or grid {x, y, cols, dx, dy, cells, col_props} for tables and calendars (x, y = first cell; align applies per cell). Returns {count, items:[{uuid, name, type, box}], overset?}. |
| edit_textA | Change text frames (refs: text frames or groups containing them). In order: contents (replace all text) → replace {find, with, all (default true), ignore_case} (without refs: in EVERY text frame of the document; keeps the styling of the replaced text) → paragraph props / character props for the whole frame → ranges:[{start, end | match, nth, …props}] to style parts. Props as in create_text. Returns {count, items, edits, overset?}. |
| modify_itemsA | Change many items in one call. refs + props apply the same props to all; items:[{ref, …props}] gives per-item values (top-level props are shared defaults). Geometry: x, y (top-left), w, h, keep_ratio, anchor, bounds, scale_strokes. Appearance: fill, stroke (colour or "none"), stroke_width (pt), dash (pt; [] = solid), cap, join, opacity, blend, graphic_style (applied first); name, note, hidden, locked. On groups, fill/stroke go to every path and text inside. Locked items need locked:false. For text attributes use edit_text; for rotation/scaling by factors use transform_items. Returns {count, items:[{uuid, name, type, box}]}. |
| delete_itemsA | Delete items by refs (a group and its children listed together are deleted once). Locked items are skipped unless force:true (items on locked layers are always skipped). Returns {deleted, skipped_locked?}. |
| transform_itemsA | Move / scale / rotate / reflect items (in that order: scale, reflect, rotate, move). dx, dy (session units) · scale (% uniform) or sx, sy (%) · rotate (degrees, positive = clockwise on screen) · reflect "horizontal" | "vertical". origin: anchor of each item's bounds (default center), or a point [x, y]. as_group:true uses the bounds of all items together (e.g. rotate a selection as one). copies: n → step-and-repeat: makes n copies, each one transformed from the previous (e.g. dx:30, copies:5 → a row; rotate:30, copies:11, origin:[cx,cy] → a ring). Returns the copies; without copies returns the items. scale_strokes: scale stroke widths too. |
| duplicate_itemsA | Copy items. One of:
|
| arrange_itemsA | Structure and stacking. action: "group" (refs → one group at the frontmost item's place, order kept; name) · "ungroup" (groups → their items; clipping released unless release_clip:false) · "clip" (refs → clipping group; mask = the frontmost item or mask ref; must be a path/compound) · "compound" (paths → compound path) · "release_compound" · "front" | "forward" | "backward" | "back" (z-order, relative order kept) · "move_into" (target: "layer:Name" (created if missing) or a group; position "front" (default) | "back") · "move_above" | "move_below" (target item). Returns the resulting items. |
| align_itemsA | Align and/or distribute items. horizontal: "left" | "center" | "right"; vertical: "top" | "middle" | "bottom". to: "selection" (default: the bounds of all given items) | "artboard" (artboard index, default the reference one) | "key" (key ref stays put). distribute: "horizontal" | "vertical" — equal gaps between items (within their extent, or across the artboard with to:"artboard"), or a fixed spacing (session units). bounds: "geometric" (default) | "visible" (incl. stroke). |
| path_opsA | Path operations (results replace the inputs and become the selection). op: Pathfinder on 2+ items (or one group): "unite" | "minus_front" | "minus_back" | "intersect" | "exclude" | "divide" | "trim" | "merge" | "crop" (a result with several pieces comes back as a group). "outline_stroke" (strokes → filled paths) · "offset" (distance in session units, negative = inwards; joins miter|round|bevel; miter_limit; keep_original) · "expand" (bake appearance/effects) · "outline_text" (text → paths; the name is kept, the uuid changes) · "trace" (images → vector paths; preset e.g. "[Black and White Logo]") · "trap" (spread: an overprinting stroke of each item's own fill colour; distance = trap width, default 0.25 pt). name: names the result when there is one. Returns {count, items}. |
| layersA | Layers of the active document. Names may be "Parent/Child" paths; a bare name is looked up at any depth; "@active" / "@first" name the active / top layer; "Layer 1" also finds the localised default layer. action: "list" (tree with items, visible, locked, printable, color, sublayers) · "add" (name; parent for a sublayer; position; props) · "update" (name → new_name and props) · "remove" (name; refuses if it has items unless force:true) · "reorder" (name, position) · "activate" (name). Props: visible, locked, printable (false = non-printing), template, dim_images, color (layer highlight, "#rrggbb"), opacity. position: "top" | "bottom" | "above:Name" | "below:Name". |
| artboardsA | Artboards of the active document. Rects are [x, y, w, h] with y = TOP, in session units, measured from the top-left of ARTBOARD 0 (stable: the active artboard changes), the same for reading and writing. action: "list" · "add" (rect; or w, h → placed right of the last artboard with spacing; name) · "update" (index; name; rect or x/y/w/h; move_art:true moves the art on it along) · "remove" (index; art stays) · "activate" (index) · "fit_to_art" (index; to the art on it, or to refs with pad) · "grid_layout" (columns, spacing: rearrange all artboards left→right, top→bottom; their art moves along unless move_art:false) · "crop_marks" (around artboard index, all:true, or refs; offset from the trim (default the document bleed, at least 3 mm), length (default 5 mm), weight pt (0.25); drawn in [Registration] into a group on layer "Crop Marks"). index defaults to the active artboard. |
| swatchesA | Swatches of the active document. kind: "global" (global process — edit once, every use updates; default for add) | "spot" | "process" (plain) | "gradient". action: "list" (kind, group filters) · "add" (name, color; updates the swatch if it exists, so batches can be re-run; gradient: type linear|radial, stops [{color, at 0-100, opacity, midpoint}]; group) · "update" (name → color / stops / new_name / group) · "remove" (name or names) · "clean_defaults" (remove the default process swatches, unused default gradients/patterns and empty groups; keeps [None], [Registration], global and spot swatches and "keep" names) · "import" (path: an .ase swatch library; kind and group override the file's) · "recolor" (refs? default all: every fill, stroke, text run and gradient stop → the nearest of to [swatch names, "group:Name"; default all global/spot] within tolerance (ΔE, default 20), or map {"cmyk(…)": "swatch:X"}; tints stay tints; dry_run → report only) → {colors [{from, to, de, uses}], unmatched} · "convert" (mode cmyk|rgb|gray through the colour profiles; refs, default all — then cmyk/rgb also switch the document mode). Use them as colours: "swatch:Name", "swatch:Name@50" (tint), "gradient:Name@45" (angle). |
| fontsA | Installed fonts. query (substring of PostScript name or "Family Style", spaces/dashes ignored) and/or family (exact) → [{name (PostScript), family, style}] (limit default 50); families_only:true lists family names. resolve:"Montserrat SemiBold" shows which font the fuzzy matching used by create_text picks. |
| stylesA | Paragraph, character and graphic styles (kind, default "paragraph"). action: "list" (names; spec = the props this tool stored for styles it made — Illustrator can't report style attributes safely) · "create" (name + props; refs applies it right away) · "update" (name + props to change; new_name) · "apply" (name, refs: text frames or groups; character styles can target match text; clear_overrides default true) · "remove". Paragraph props: font, size, fill/color, leading, tracking, caps, … + align, space_before/after, indents, hyphenation. Character props: the font/colour ones. Graphic styles: list and apply only (they can't be created from scripts). |
| placeA | Bring a file or SVG markup into the active document. path: .png/.jpg/.tif/.psd/… (linked; embed:true embeds) · .pdf/.ai/.eps (linked; page for PDFs; editable:true imports the artwork as editable paths) · .svg (editable by default). svg: SVG markup string instead of a file → editable artwork. Position: x, y (top-left; default: centred on the artboard), w and/or h (fit, keep_ratio default true). layer / parent, name. Returns {uuid, name, type, box, how: "linked" | "embedded" | "editable"}. |
| symbolsA | Symbols. action: "list" → [{name, instances}] · "create" (refs, name; the items become one instance, keep:true leaves them) · "place" (name, x, y, w?, h?, layer?) · "replace" (refs = instances, name) · "expand" (refs: instances → editable art) · "remove" (name; force:true also deletes its instances). |
| menu_commandA | Escape hatch: run an Illustrator menu command by its internal name (app.executeMenuCommand), e.g. "group", "expandStyle", "Live Pathfinder Add", "OffsetPath v22" (outline stroke), "selectall", "deselectall". refs are selected first. Returns the selection afterwards. WARNING: commands that open a dialog block Illustrator until someone closes it — prefer the dedicated tools. |
| historyA | Undo or redo in the active document. One step = one earlier tool call (a whole batch is one step); a call cannot undo itself. action "undo" (default) | "redo", count (default 1). |
| run_scriptA | Run ExtendScript in Illustrator on the active document in ONE call: a whole design in one script, details in small ones.
Give "code" (a function BODY: use |
| batchA | Run many tool steps in ONE call (one round trip to Illustrator). steps: [{tool, args, artboard?}] — artboard: this step's coordinates start at that artboard's top-left; any tool except status, configure, preview, export and batch. Refer to an earlier step's items with "@n" (0-based step index) wherever a ref is accepted, e.g. {tool:"selection", args:{action:"set", refs:"@0"}}. stop_on_error (default true): stop at the first failing step. rollback (default false): if a step fails, delete the items created during the batch (not raw API creations in run_script) and close an empty new document. results: "all" (default) | "errors" (failures + counts, for big batches). steps_file: a JSON file with the steps (array or {steps}) instead of steps. files: run the steps on each file (paths, folders, globs like "jobs/*.ai"): open → steps → save → export → close. save: "copy" (default: into out_dir, originals untouched) | "in_place" (overwrites) | "none". export: [{format, path with {name} = file stem, …}]. Files already open are skipped. dry_run:true → open, run, report, close without saving or exporting. |
| previewA | Look at the active document: renders a PNG and returns it as an image. One of: artboard (index, default active), refs (items, framed with pad, default 5%), region ([x,y,w,h] from artboard's top-left if given, else the active one's; may lie off it). max_px = longest side (default 1024) or width = exact px. background "white" | "transparent". save_to copies the PNG (with reference: the comparison, and the render as .preview.png). reference: an image (PNG/JPEG) to compare with → ONE image [reference | preview | difference in red] (600 px panels) + rmse (0 = same), content_box in both (shift/scale show an offset or wrong size) and differences: up to 6 regions {rect, kind: shifted (with shift [dx, dy] = preview − reference) | missing | extra | changed, items there}. reference_crop: [x,y,w,h] in image pixels to cut the page out first. One check call: more [artboards] → extra renders (default 500 px); preflight:true, info:true (document_info) add those results. |
| exportA | Export the active document (it stays unchanged). format: "pdf" | "png" | "jpg" | "svg" | "webp". artboards: [indices] | "all" (default: the active artboard). refs: export just these items (png only). path: a file, or a folder (several outputs: -.; with a file path -.). variants: [{name, show:[layers], hide}] → one export each (-); layers restored after. Screen assets (png, refs): each:true → a file per item named after it; scales:[1,2,3] → name@2x.png…. PDF: preset (default "[PDF/X-4:2008]"; any name from Illustrator's PDF presets), pages "one_file" (default) | "per_artboard", bleed: "document" (default: its bleed if known) | number | [left, top, right, bottom] in session units → pages grow by it, TrimBox = artboard, BleedBox = page; output_intent: an installed CMYK profile by name ("FOGRA39", "GRACoL") or an .icc path → the PDF/X output intent. Warns about variable fonts (B10). Raster: scale (factor, default 1) | dpi | width (px); background "white" | "transparent" (png, webp); jpg is quality 80. SVG is clipped to the artboard; svg_text "outline" | "text". Returns {files:[{path, artboards, bytes, pages?, pdfx?, output_intent?, boxes?}]}. |
| preflightA | Print checks of the active document in one pass. Hidden items and hidden/non-printing layers are skipped (counted in skipped_non_printing) unless include_non_printing. errors: missing_font, broken_link, rgb_in_cmyk (paths, text, RGB images), overset_text, white_overprint · warnings: registration_color (art painted with [Registration]), low_res (< min_dpi, default 300), empty_text, default_text (unnamed 12 pt Myriad leftovers), off_artboard, small_text (< min_text_pt, default 5), hairline (< hairline_pt, default 0.25), no_bleed (art at an artboard edge, document without bleed), low_contrast (text below WCAG AA on what lies under it; RGB documents, any with contrast:true), off_token (colours/fonts/sizes outside tokens {colors, fonts, sizes}) · info: spot_color (real spot inks only — global process swatches are not spots), overprint, transparency, live_text (one count line), empty_group. Also returns inks (process plates, spot inks) and the bleed. ignore: categories to skip; max_items per category (default 20). |
| data_mergeA | Variable data (certificates, badges, labels, cards): fill a template once per data row. Template: the items on artboard (default 0) or refs. "{{field}}" inside any text is replaced, keeping its style. An item NAMED "{{field}}" takes the whole value: text → contents, linked image → relinked (file path, fit in its box), symbol → symbol name, shape → fill colour; NAMED "{{?field}}" → shown only if the value is non-empty (not 0/false/no). Data: data (.csv/.tsv/.json file; relative image paths resolve from its folder) or rows [{field: value}]; offset, limit. mode: "artboards" (default: one new artboard per row; columns, spacing) · "grid" (n-up: grid {cols, rows, dx, dy} copies per new artboard, the first where the template sits) · "files" (one export per row: export {format, path with {field}/{n} tokens, …export args}; the document is left unchanged). name: artboard name pattern (default "{n}"). remove_template:true deletes the template and its artboard at the end. dry_run:true → template fields vs data columns; nothing changes. |
| effectsA | Live effects on items (editable later in Illustrator; lengths in session units, opacity 0-100). add: [{type, …}] in order: drop_shadow {x, y, blur, color, opacity, blend} · outer_glow / inner_glow {blur, color, opacity, blend; inner: from "edge"|"center"} · round_corners {radius} · feather {radius} · blur {radius} · offset {distance, joins} · roughen {size, detail, smooth} · zigzag {size, ridges, smooth} · pucker_bloat {amount: <0 pucker, >0 bloat} · transform {x, y, scale, scale_x, scale_y, rotate, copies} · {xml: raw LiveEffect XML}. clear:true first removes all effects (paths/groups keep their fill and stroke). Effects can't be read back; path_ops expand bakes them. Returns {count, items (box incl. effects)}. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| recreate_design | Rebuild a flat design (poster, calendar, price list…) from a screenshot or photo as an editable, print-ready Illustrator file. |
| print_export | Preflight the active document, fix what blocks printing, and export a PDF/X-4 with bleed. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 35 tools
The set is large but carefully partitioned: search (find_items), detail (get_items), outline (get_tree) and selection are clearly distinct, and shape/path/text creation is unambiguous. The only soft overlaps are modify_items vs transform_items (both move/resize) and menu_command vs run_script (two escape hatches), but the descriptions make the intended split explicit (attribute/property changes vs scale-reflect-rotate-move, menu command vs ExtendScript).
Names are uniformly lowercase snake_case and follow a predictable two-track convention: resource tools (documents, layers, artboards, swatches, styles, symbols, effects) take an 'action' parameter, while item operations use verb_noun (create_shape, edit_text, delete_items, align_items). This is consistent and readable, though the dual convention means an agent must remember which tools are action-dispatched rather than verb-named.
35 tools is heavy and sits above the comfortable range, even for a full-featured Illustrator automation server. Most tools earn their place given the genuine breadth (documents, geometry, text, paths, layers, artboards, swatches, styles, effects, export, preflight, data merge, scripting), but a few could be folded together (status/configure/history, symbols into the generic resource pattern, align/arrange) to reduce surface area.
The surface covers the full design lifecycle: document creation/open/save, inspection, search, shape/path/text creation and editing, transforms, duplication across artboards, grouping/clipping/stacking, pathfinder ops, layers, artboards, swatches, styles, placement, effects, export, preflight, data merge, undo, batching and raw scripting. No obvious dead ends remain — anything missing is reachable through run_script/menu_command.