Visual

Designs

The 10 tools for designs. Before an agent first makes one, it reads guide topic design.

create_design

Add a design to a space: a canvas of artboards (landing pages, app screens, posters…) built on a design system (tokens) and components. People select any element to restyle it, comment, and click through linked artboards. Read guide topic "design" first. Returns the files with versions and any problems found.

Parameters

space_idstringrequired
titlestringrequired
tokensobject
tokens.json: W3C design tokens (DTCG). Omit for a neutral placeholder system.
componentsobject[]
Show child attributes
namestringrequired
Used as <x-component name="…">
htmlstringrequired
Full HTML file; <body> holds ONE root element with {{holes}} and data-props on it.
widthinteger
Preview frame on the canvas
heightinteger
boardsobject[]required
Show child attributes
namestring
Artboard name; its file becomes <name>.html
htmlstringrequired
The whole artboard file (see guide topic "design"): static HTML and CSS, look in inline styles, system values as var(--…).
widthintegerrequired
Frame width in px: page 1280–1440, phone 390, tablet 834
heightintegerrequired
Frame height: a screen's fixed height, or a page's full content height
kindstring
screen = fixed frame (app screen, poster); page = fluid web page. Default: page from 1024px wide. One of screen, page.
viewportsobject[]
Pages only: the same file also shown at these widths, e.g. [{"w":390,"h":6000}]
Show child attributes
wintegerrequired
hintegerrequired
themestring
"dark" shows the tokens' dark values
themestring

read_design

Read a design as it is now, including people’s edits: the canvas (boards with size, kind, viewports), tokens.json and the CSS variables it generates, components and artboards — each file with its version for edit_design/write_design. Pass files to read only some.

Parameters

item_idstringrequired
filesstring[]
e.g. ["Main.html", "components/Tier.html"]

write_design

Write whole design files in one all-or-nothing call: artboards (Name.html), components (components/Name.html) or tokens.json. Each file: path, full content (null deletes it), base_version = the version you read (null for a new file), and for a new artboard its board {w, h, kind, viewports}. The canvas follows by itself. If anyone saved a file after your version, nothing is written and the error names the files to read again. For small changes use edit_design.

Parameters

item_idstringrequired
filesobject[]required
Show child attributes
pathstringrequired
contentstring | nullrequired
base_versioninteger | nullrequired
boardobject
Where and how the file shows on the canvas. New files are placed for you; give w, h and kind.
Show child attributes
winteger
hinteger
xnumber
ynumber
titlestring
kindstring
One of screen, page.
themestring
viewportsobject[]
Show child attributes
wintegerrequired
hintegerrequired
themestring
"dark" shows the tokens' dark values

edit_design

Change one design file in place, leaving everything else (and people’s edits) as it is. On an artboard or component: set_style (inline style properties), set_text, set_html, replace, insert (before/after/prepend/append html), remove, set_attrs, add_class/remove_class — each by CSS selector — and replace_text (exact text). On tokens.json: set_token / remove_token. Edits apply in order, all or none, against base_version. board resizes or moves the file's frame (e.g. set h to the content height render_design reported).

Parameters

item_idstringrequired
filestringrequired
e.g. "Main.html", "components/Tier.html", "tokens.json"
base_versionintegerrequired
The version you read
editsobject[]
Show child attributes
opstringrequired
One of set_style, set_text, set_html, replace, insert, remove, set_attrs, add_class, remove_class, replace_text, set_token, remove_token.
selectorstring
CSS selector in the file; must match one element unless all is true
allboolean
stylesobject
set_style: {"padding": "24px", "color": "var(--color-ink)", "margin": null}
textstring
set_text
htmlstring
set_html (inner), replace (whole element), insert
positionstring
insert: where, relative to the selected element One of before, after, prepend, append.
attrsobject
set_attrs: {"href": "Pricing.html", "hidden": null}
classesstring[]
findstring
replace_text: exact text in the file
replacestring
tokenstring
set_token/remove_token: dotted path, e.g. "color.accent"
valueany
set_token: the $value
typestring
set_token: $type for a new token
modestring
set_token: set the value for this mode instead, e.g. "dark"
descriptionstring
boardobject
Where and how the file shows on the canvas. New files are placed for you; give w, h and kind.
Show child attributes
winteger
hinteger
xnumber
ynumber
titlestring
kindstring
One of screen, page.
themestring
viewportsobject[]
Show child attributes
wintegerrequired
hintegerrequired
themestring
"dark" shows the tokens' dark values

render_design

See a design: renders artboards in Chromium exactly as the canvas shows them and returns screenshots plus problems with selectors — things sticking out of the frame, cut-off text, frame height vs content height, broken images, fonts not loaded, small text and tap targets, and WCAG failures from axe-core (contrast ratio, alt text, names, heading order). Every frame of a page (each viewport) is checked. Tall frames come in slices; pass from_y for the rest.

Parameters

item_idstringrequired
boardsstring[]
Files to render; default every artboard (not components)
screenshotsboolean
false = checks only (faster, no images)
from_yinteger
Start the screenshot slices this far down

find_icons

Search Lucide icon names (2,000+) for <x-icon name="…">. Query by meaning, e.g. "arrow right", "settings", "shield check".

Parameters

querystringrequired
limitinteger

find_fonts

Google Fonts families (most popular first) to use in font tokens or font-family; any family you name loads by itself.

Parameters

querystring
Part of a family name
categorystring
One of Sans Serif, Serif, Display, Handwriting, Monospace.
limitinteger

design_history

The versions of one design file, newest first (each save makes one; the last 100 are kept): who saved it and when. Read an old one with read_design_version, bring it back with restore_design_version.

Parameters

item_idstringrequired
filestringrequired
e.g. "Main.html", "tokens.json"

read_design_version

The content of one earlier version of a design file (see design_history).

Parameters

item_idstringrequired
filestringrequired
versionintegerrequired

restore_design_version

Bring back an earlier version of a design file: its content becomes the newest version (the current one stays in the history). base_version is the current version you read; refused if someone saved since.

Parameters

item_idstringrequired
filestringrequired
versionintegerrequired
base_versionintegerrequired