codesign
v0.9.0Local design engine for AI agents: create, edit and export real, editable designs.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
edit
Edit the CE.SDK canvas by running JavaScript against the live CreativeEngine. The result becomes the session’s current state. ⚠ BEFORE your first `edit`, read `skill://codesign/api/SKILL.md`, `skill://codesign/judge/SKILL.md` and `skill://codesign/judge/design-rules.md` in one message: the edit-code API and the rules a design is built to. Worked examples, and the lookup for a cryptic error ("Known engine defects"), are `skill://codesign/api/recipes.md`. There is no `parent` and no revision id: `edit` always continues the design in front of you. Every successful edit is kept — the prod…
| Parameter | Type | Description |
|---|---|---|
code * | string | Async JS body using `engine.design` — the whole edit API; EVERY member returns a Promise (await it): create({ type, name?, props?, children? }, { parent? }), setProps(id, props), getProps(id, select… |
design | string | The design this call is about: its `uri`, verbatim as `import`, `open` or `designs` gave it. Omitted ⇒ the design you are on. When other agents (subagents) share this connection, always pass it. |
note | string | Freeform descriptive text — what this edit accomplished. Metadata only; never load-bearing. |
render | boolean | Default true: a mutating edit's result ends with a render of the page it changed. Set false to skip the image on read-only or diagnostic edits where seeing it adds nothing. |
skills | string | Optional: comma-separated names of the CoDesign skills you are following for this edit (e.g. "create,api,judge"). The names are sent with usage telemetry; the edit itself ignores them. |
preview
Render blocks (almost always pages) to inline images so you can see the result. `blockIds` is a LIST, rendered in the order you give it: `[pageId]` for one page, `[a, b]` for a subset, or OMIT it entirely to preview every page of the design in document order. There is nothing to address: this always renders the design you are working on. Its last state is loaded before rendering, so the ids always resolve against the right scene — never against a different design another agent may have loaded on a shared server. Preview several blocks at once when REVIEWING or capturing a finished design…
| Parameter | Type | Description |
|---|---|---|
blockIds | array | Blocks to render, in the order you want them back — almost always page ids, not the scene root. Omit it (or pass `[]`) to preview every page of the design in document order. At most 10 render per ca… |
design | string | The design this call is about: its `uri`, verbatim as `import`, `open` or `designs` gave it. Omitted ⇒ the design you are on. When other agents (subagents) share this connection, always pass it. |
region | object | Rectangle to render, in the design's units from the top-left corner of the page of the one id in `blockIds` (required) — {x: 0, y: 0} is that page's corner on every page; subtract the page's `global… |
time | number | Playback time in seconds (any scene mode) along the timeline of what is rendered — the page a block sits on, since blocks are previewed in place (0 = first frame) — applied to every block in the c… |
uri | string | Look at an ASSET instead of the design: the `uri` or `meta.thumbUri` an earlier tool result gave you (a generated, uploaded or imported image, or one an asset search returned). Cannot be combined with… |
import
Import a design FILE as a NEW design — a CE.SDK `.imgly` design file; a Photoshop (`.psd`/`.psb`), InDesign (`.idml`), PowerPoint (`.pptx`) or PDF file; a Lottie animation (`.json`/`.lottie`), which becomes a one-page video design with editable, keyframed layers; a Figma file (`.fig`), whose first canvas becomes the design, a page for each top-level frame and one more for what lies outside the frames (the warnings name any other canvases); or a plain image or SVG, which becomes a one-page design sized to the image. To make a media file (image/font/video/audio) available for use INSIDE a desi…
| Parameter | Type | Description |
|---|---|---|
source | object | The design to load. Provide exactly one of `url` (http/https), `uri` (a saved design), `demo` (a bundled demo design), `path` (absolute local file path; Local only). |
title | string | Display name for the design once you save it. Defaults to the source file's basename. Without a `source`, starts an empty design under it. |
open
Work on a saved design itself: every later edit is saved into it. Pass the `uri` an `import` or `designs` gave you, verbatim. To start from a copy instead, `import` its `uri`. Returns `{ uri, title }`.
| Parameter | Type | Description |
|---|---|---|
uri * | string | The design to work on. |
export
Export the design you are working on — `format` picks the deliverable: `pdf` (print PDF), `png`/`jpeg`/`webp` (image), `svg` (vector SVG), `pdfx` (print-ready PDF/X), `html` (responsive HTML5), `idml` (Adobe InDesign), `psd` (layered PSD), `fig` (Figma), `mp4` (video), `wav`/`m4a` (audio), `imgly` (editable design file). Renders `blockId` — or the whole document when `blockId` is omitted; `mp4`/`wav`/`m4a`/`html`/`psd` render one page: pass its id as `blockId`, or omit it on a one-page design. Your edits are saved to the design as you make them (the viewer shows it), so there is nothing t…
| Parameter | Type | Description |
|---|---|---|
format * | string | The deliverable: pdf → print PDF; png/jpeg/webp → image; svg → vector SVG; pdfx → print-ready PDF/X; html → HTML5 page; idml → Adobe InDesign document; psd → layered PSD; fig → Figma f… |
bleed | boolean | For `format=png`/`jpeg`/`webp` only (invalid with any other format). A page with print bleed renders trim + bleed by default; `false` renders it at its trim size. The design keeps its bleed. |
blockId | integer | The page to render; an image format takes any block. Omit to export the whole document: a multi-page PDF, or one composite image of all pages. Required for format=html/psd (pass a page id). Required f… |
design | string | The design this call is about: its `uri`, verbatim as `import`, `open` or `designs` gave it. Omitted ⇒ the design you are on. When other agents (subagents) share this connection, always pass it. |
fps | number | Frames per second for `format=mp4` only (invalid with any other format), greater than 0. Default: the scene's `scene.frameRate`, which is 30 unless set. Common values: 24, 25, 30, 60. |
height | integer | For `format=png`/`jpeg`/`webp`/`mp4` only: the file's height in px, scaled up or down; the aspect is kept, and with both it fits inside them, never stretched. The design keeps its size. At most 65500… |
html | object | Options for `format=html` only (invalid with any other format). |
outPath | string | Absolute path (including filename) to ALSO write the artifact to — the workspace copy is still written, and the response then carries `path`. Use when you need the file on disk and cannot fetch loca… |
page | integer | The page to render by its position in the design, 0 for the first (the order of `engine.scene.getPages()`), instead of its `blockId`. Not with `blockId`, `imgly`, `idml` or `fig`. |
pdfx | object | Options for `format=pdfx` only (invalid with any other format). Omit entirely for sensible print defaults: PDF/X-4, fogra39, embedded ICC. |
width | integer | For `format=png`/`jpeg`/`webp`/`mp4` only: the file's width in px, scaled up or down; the aspect is kept, and with both it fits inside them, never stretched. The design keeps its size. At most 65500 f… |
designs
The saved designs you can `open` or `import` a copy of, newest first, a page at a time. The one you are working on is marked `current`. A row marked `unsaved` is work an earlier session left before it was saved: `open` it to continue.
| Parameter | Type | Description |
|---|---|---|
cursor | string | The next page, as the previous answer named it. Omit for the newest designs. |
limit | integer | Designs per page. Default 50. |
scorecard
Record the verdict of a judge loop you have COMPLETED for the design you are working on — the final step of the `judge` skill. Recording is a claim about work already done: never call this without having scored the axes against actual `preview` renders of the design in its current state. `verdict: 'pass'` — every applicable axis scored ≥ 8; the design may be delivered. `verdict: 'fail'` — you are stopping with an axis below 8 (e.g. the user cut remediation short); the failure stays on record. There is no `revision`: the verdict covers the session as it stands when you record it, and…
| Parameter | Type | Description |
|---|---|---|
verdict * | string | 'pass' when every applicable axis scored ≥ 8, 'fail' when stopping below the gate. |
design | string | The design this call is about: its `uri`, verbatim as `import`, `open` or `designs` gave it. Omitted ⇒ the design you are on. When other agents (subagents) share this connection, always pass it. |
rename
Give a design its title — the name `designs` lists it by. Without `uri`, renames the design you are working on: if it is saved already, it is renamed now, and otherwise its first change saves it under the title. With `uri` (from `designs` or `import`), renames that saved design. Returns JSON `{ uri, title, previousTitle }`, or `{ title }` while the design has no change saved yet. Nothing in the design changes.
| Parameter | Type | Description |
|---|---|---|
title * | string | The new title. |
design | string | The design this call is about: its `uri`, verbatim as `import`, `open` or `designs` gave it. Omitted ⇒ the design you are on. When other agents (subagents) share this connection, always pass it. |
uri | string | A saved design to rename. Omit it to rename the design you are working on. |
checklist
Register the brief's ACCEPTANCE CHECKLIST — the machine-checkable claims that must hold before the work counts as done. Do this right after intake, before the first edit: extract from the brief every required output file, every string of approved copy that must land verbatim, and note the constraints only you can check. Skip it only when the brief fixes no outputs or copy. Item kinds: - { kind: 'output', path } — a file that must exist when the work is delivered (absolute path, e.g. every variant the brief orders exported with `outPath`). - { kind: 'copy', text } — approved copy that mu…
| Parameter | Type | Description |
|---|---|---|
design | string | The design this call is about: its `uri`, verbatim as `import`, `open` or `designs` gave it. Omitted ⇒ the design you are on. When other agents (subagents) share this connection, always pass it. |
items | array | The full checklist (at most 64 items); replaces the current one. Omit to read the current list. |
view
Get a URL the human can open to view and edit the design you are working on in CE.SDK. Returns the design's stable URL — it follows every change, so print it ONCE and don't re-emit a fresh URL every turn. The page is a full editor; when the human clicks 'Save', their edits land in the same design file. A new design is viewable after its first change. The editor opens in the mode the human last chose for this design, else 'motion' (timeline) when the design has animation, video, audio or timed blocks and 'design' otherwise; pass `mode` to force one. The human can change the design there and s…
| Parameter | Type | Description |
|---|---|---|
mode | string | Editor mode to open in: 'motion' shows the timeline and clip tools, 'design' the still-design editor. |
asset_search
Search every asset source of this server's engine, live; earlier sources rank first. Read-only — never creates a revision. Returns JSON `{ sources: [{ source, description, total, nextPage, failed, assets }] }`; each asset has `id`, `label`, `mimeType`, `uri` (a style: none) and `groups`, an image its `width` and `height` in pixels, an audio and video asset its `duration` in seconds, and a typeface asset (e.g. from the `ly.img.gfonts` Google Fonts source) a compact `typeface: { name, weights, styles }`. A source's `description` says what it holds. Typefaces: `mimeType: ['application/ubq-type…
| Parameter | Type | Description |
|---|---|---|
groups | array | Only assets in one of these groups. |
mimeType | array | Only these types: exact (`image/png`) or a family (`image/*`). |
page | integer | Default 0. |
perPage | integer | Per source. Default 20. |
query | string | Words to find in labels and tags. Omit to list. |
source | string | Only this source, as a result named it. |
asset_add
Add a local media file (image, font, video, or audio) to the workspace so it can be used in a design. Copies the file bytes into the content-addressed asset store at `assets/<sha>.<ext>`. The bring-your-own arm of the asset family: `asset_search` finds an existing asset, `asset_generate` makes one, `asset_add` takes one off your disk — all three return a `workspace://` uri to embed in `edit`. (To turn a design FILE into a new design, use `import`.) Returns JSON: `{ uri, httpUrl, mimeType, kind, width?, height?, bytes, note? }`; an image has `width` and `height` in pixels — frame it at tha…
| Parameter | Type | Description |
|---|---|---|
source * | object |
asset_generate
Unavailable until you sign in with `login` (free IMG.LY account); once signed in, it works. Generate images, video, speech, music and sound effects — and transcribe speech — via the AI gateway. Call with NO arguments first: returns the curated model catalog, every entry tagged with its `capability` (text2image, image2image, text2video, image2video, text2speech, speech2text, …). Filter with `capability`; `source: "all"` (together with a `capability`) adds the provider models — e.g. music and sound effects under `text2audio`. Then call with `model` + `prompt` (+ optional `format`, an…
| Parameter | Type | Description |
|---|---|---|
capability | string | Catalog filter, e.g. "text2audio", "text2speech", "speech2text", "text2video", "image2video". |
format | string | An aspect name the model takes, e.g. "16:9". The names differ per model: `model` + `schema: true` lists them under `format`. For any other shape, leave `format` out and pass `width` and `height`. |
height | integer | Pixel height, with `width`, instead of `format`. |
image_uris | array | Uris returned by `import` or an earlier `asset_generate`, used as inputs (image-to-image models). |
model | string | Model id from the catalog (call with no arguments to list). Required to generate or to read a schema. |
params | object | Model-specific inputs sent verbatim (e.g. { "voice": "Aria" }, { "duration": 8 }). Asset uris inside are uploaded first. |
prompt | string | What to generate. Required with `model` unless the model takes its input through `params`. |
schema | boolean | With `model`: return that model's input schema instead of generating. |
source | string | Catalog source: "catalog" (default, curated) or "all" (adds the provider models; needs `capability`). |
width | integer | Pixel width, with `height`, instead of `format` (e.g. 832 × 1248 for 2:3), within the model schema's CustomSize limits. |
diagnostics
Inspect this codesign MCP server: `status` (default) reports what is running (build id, CE.SDK engine version, non-secret config); `summary` returns a bounded digest of recent activity (counts, recent errors, slowest calls); `open` returns a clickable local viewer URL with a Download-ZIP button to send diagnostics to IMG.LY.
| Parameter | Type | Description |
|---|---|---|
action | string | status (default) | summary | open |
login
Sign in with your IMG.LY account (opens the system browser). The session saves automatically once the user finishes in the browser; call login again anytime to confirm — safe to repeat, it does not restart the flow or invalidate the open link. Pass switch_account=true to sign in as a different user.
| Parameter | Type | Description |
|---|---|---|
switch_account | boolean | Force a fresh sign-in screen even if a session exists. |
logout
Sign out of your IMG.LY account (revokes the session and clears local credentials).
read_skill_resource
Read a CoDesign skill file by its `skill://codesign/<name>/<path>` URI; returns the same text as the MCP resource. Use it only when your host can't read MCP resources — otherwise read the resource directly.
| Parameter | Type | Description |
|---|---|---|
uri * | string | A skill URI, e.g. skill://codesign/api/SKILL.md. |