Brilliant Design
v0.1.11Design canvas for coding agents: real editable vectors, auto layout, components, export to code.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_selection
Get the IDs and blueprint of currently selected elements on a specific canvas. Returns selected element IDs and their blueprint representation including descendants. A selection past 1,000 elements (descendants included) is summarized: counts by type (`countsByType`), union bounds (`worldBounds`), the first 100 ids and a `note`, beside the true `count`. Use `read` with a `scope` of ids or #refs for full subtrees. (External MCP clients: call `init` first for usage docs. Hosted-CLI and sub-agents have docs pre-loaded.)
| Parameter | Type | Description |
|---|---|---|
canvasId * | string | Canvas ID to get selection from. REQUIRED. |
project | string | Optional: run THIS call against a project other than the session's bound one: a name or key from list_projects (or an unambiguous name/handle substring), or the absolute path of a project folder (one… |
export
Export elements in the specified format and return the data. Raster formats (png, jpeg, webp) return an inline image. SVG returns raw SVG markup as text. HTML returns an HTML/CSS snippet as text. PDF returns base64-encoded data as text. Video formats (mp4, mov) write a file (large binary is never inlined) and return its path; use `duration` (seconds, max 30) and `fps` to control length. MOV supports a transparent background; MP4 does not. With `motion` (mp4/mov) it renders a FILM, `Motion/<film>.bm` beside the canvas or at the project root: STATE frames tweened by element name, per-frame bluep…
read
Read the project's documents, each answered as the fence you would send back through edit: a canvas as ```bl with file(path) first and its rows (ids bound), a film as ```bm, a design system as ```ds. A canvas answer lists the films that name it above its fence (`films: Motion/Launch.bm`). Pass `paths` (canvas paths such as "Projects/Dashboard", "Motion/Launch.bm", "Styles/default.ds"), `ids` (element ids or #refs, with their canvas in paths) and/or the filters (query, textContent, type, fillColor, componentName) to find elements across canvases. `format` is "blueprint" (default), "summary" (co…
| Parameter | Type | Description |
|---|---|---|
ancestors | With disk: each matched row carries its parent chain, board first. | |
componentName | string | Find instances of a component whose master name contains this substring (case-insensitive). |
consumersOf | string | With disk: the id of a component master. Answers each canvas holding a copy of it: the copies, and the canvas row count to weigh a master edit. Set a master's id, not a variant child, for the copies o… |
depth | Subtree depth per match, in every format. 0 = matched element only, 1 = + immediate children, etc. Omitted: unlimited for "blueprint", the matched elements only for "summary" and "skeleton" (each reco… | |
disk | true answers from the saved .bl files on a background isolate: it never loads, opens or writes a canvas, whatever its size, so a heavy or closed canvas is safe to read. Rows come as stored, one header… | |
expandInstances | READ-ONLY. When true (with format="blueprint"), a component instance is not collapsed to its compact inst() line: its derived children are shown as full lines with their REAL ids so you can inspect an… | |
fillColor | string | Find elements with a fill matching this hex color (e.g. "#FFCC00" for yellow). Perceptual color matching, close shades are included. |
format | string | Output shape per canvas, inside its fence. "blueprint" (default) is the rows with their ids, what edit takes back. "summary" is compact metadata (id, name, type, parentId, parentName, childCount, text… |
full | READ-ONLY. When true (with format="blueprint"), return the COMPLETE vector geometry even for a large path. Default false: a vector whose blueprint would blow the per-readback token budget is summarize… | |
ids | Element IDs (or #refs) to read, the same as listing them in `scope`. `elementIds` is accepted as an alias. | |
limit | Max top-level matches across all canvases. Defaults to 50. It applies with explicit element IDs too. | |
paths | The documents to read: canvas paths (e.g. "Projects/Dashboard", .bl optional), films ("Motion/Launch.bm") and design systems ("Styles/default.ds"). Omit with a filter to search every canvas. | |
pattern | string | With disk: a regular expression over each stored row, for what the filters leave unnamed (a font size, a token, an override). |
project | string | Optional: run THIS call against a project other than the session's bound one: a name or key from list_projects (or an unambiguous name/handle substring), or the absolute path of a project folder (one… |
query | string | Case-insensitive substring match on element name AND canvas path. Element matches answer as fences; canvas matches ride the `canvases:` line. Canvas matching only runs when no `paths` are given. With… |
sessionId | string | Your session id from init: #refs resolve per session. |
subtree | With disk: each matched row carries its descendants, bounded by depth. | |
textContent | string | Case-insensitive substring match on text element content. |
type | string | Filter by element type. One of: vector, line, circle, rectangle, text, parent. |
list_projects
List every project this user owns, each with its display name, key (a folder path or brilliant-cloud:// key), backing (local/synced/cloud), open state (active tab / background tab / closed), canvas count when known, and whether it is published, with its url, visibility, audience and your role where known. Pass a name or key from this list as the `project` argument on `init` or any canvas tool to work in a project other than the one on screen, including a closed one.
edit
Edit the project's documents. `text` holds one or more fences, applied in order: ```bl (a canvas, blueprint rows: omit ids for new elements, lead with an id or #ref to modify, delete(#ref) to remove, preview(#a, #b) as a row for a screenshot), ```html (a canvas, HTML with inline CSS converted to elements), ```ds (a design system, statements spliced), ```bm (a film, the whole document replaced). The first row of every fence is file(path): file("Projects/Launch"), file("Styles/default.ds"), file("Motion/Launch.bm"). A call holds fences on any number of documents, canvases included, applied in or…
| Parameter | Type | Description |
|---|---|---|
background | Optional. true answers a `job:` id at once and runs the call on; wait({job}) blocks until it ends and answers its result. An edit waits its turn behind other agents' writes instead of refusing. Use it… | |
designSystem | string | Optional. Design-system mode for this and all later calls (sticky, once set it persists until changed). One of: `"default"` (use the project default DS, token discipline enforced, no bare hex/numerics… |
project | string | Optional: run THIS call against a project other than the session's bound one: a name or key from list_projects (or an unambiguous name/handle substring), or the absolute path of a project folder (one… |
requestId | string | Optional idempotency key. Pass a stable, unique id for this logical request and REUSE the SAME id if you retry after a timeout or relay error: the retry converges on the original result instead of app… |
response_mode | string | Optional. "full" (default) answers the block result with the blueprint of every affected element, or a read handle when that blueprint runs past 50 rows. "compact" answers the block result with a read… |
sessionId | string | Your session id from init (refs and design-system state are per session). |
text | string | The fences: ```<bl|bm|ds|html> on its own line, file(path) as the first row, the rows, ``` on its own line. Several fences in one text apply in order. |
textFile | string | Instead of text: the absolute path of a local file holding the fences, for a block a script generated. Same pipeline and same answer as text, plus a `job:` line. With no requestId the id is a hash of… |
create_modify_elements
Retired. A call answers the one line that names the door: edit({ text }) to write, read({ paths }) to read.
| Parameter | Type | Description |
|---|---|---|
blockId | string | |
canvasId | string | |
elements | string | |
format | string | |
html | string | |
paths | ||
query | string | |
scope | ||
sessionId | string |
create_html
Retired. A call answers the one line that names the door: edit({ text }) to write, read({ paths }) to read.
| Parameter | Type | Description |
|---|---|---|
blockId | string | |
canvasId | string | |
elements | string | |
format | string | |
html | string | |
paths | ||
query | string | |
scope | ||
sessionId | string |
lookup
Retired. A call answers the one line that names the door: edit({ text }) to write, read({ paths }) to read.
| Parameter | Type | Description |
|---|---|---|
blockId | string | |
canvasId | string | |
elements | string | |
format | string | |
html | string | |
paths | ||
query | string | |
scope | ||
sessionId | string |
read_objects_result
Retired. A call answers the one line that names the door: edit({ text }) to write, read({ paths }) to read.
| Parameter | Type | Description |
|---|---|---|
blockId | string | |
canvasId | string | |
elements | string | |
format | string | |
html | string | |
paths | ||
query | string | |
scope | ||
sessionId | string |
objects_result
Retired. A call answers the one line that names the door: edit({ text }) to write, read({ paths }) to read.
| Parameter | Type | Description |
|---|---|---|
blockId | string | |
canvasId | string | |
elements | string | |
format | string | |
html | string | |
paths | ||
query | string | |
scope | ||
sessionId | string |
wait
Wait for a long call to end, instead of sleeping and checking. `job` is the id from a `background: true` call of edit, export or render_ui, or the requestId (or `job:` line) of an edit, also one whose call timed out on your side. Blocks until the job is done or failed and answers its result, the answer the call itself would have given. `running` means your timeout ran out and the job goes on: call wait again. `superseded` means the job ended with an earlier app run or its answer aged out: read the canvas. If this call cannot reach the app at all, the app is down: run scripts/mcp-wait-up.sh.
| Parameter | Type | Description |
|---|---|---|
job * | string | The job id. |
sessionId | string | Your session id from init: a requestId is per session. |
timeout | Seconds to block, default 120, at most 280. 0 answers the state now. |
convert_html
Convert HTML with inline CSS to Brilliant blueprint lines WITHOUT creating anything: the exact lines edit (html) would write, per input string, plus the converter's notes. Batch many strings (the frames of a composition) in one call as `frames`. With `layout: true` each frame is also built into a throwaway world and the answer adds every element's laid-out box (x, y, w, h in canvas px, the unrotated box), its rotation, opacity, first solid fill, name, type and text, so the layout is the app's auto layout, never a guess. A `data-id` or `data-key` attribute is the element's NAME (stable identity…
| Parameter | Type | Description |
|---|---|---|
frames | HTML strings to convert, one per frame, in order. At most 1000 per call and 16 MiB in total. | |
html | string | One HTML string (the one-frame form of `frames`). |
layout | true: build each frame into a throwaway world and answer the laid-out boxes (`elements` per frame). Default false. | |
project | string | Optional: with `layout` or `tokens`, resolve against a project other than the session's bound one (its fonts and design system), a name or key from list_projects. |
sessionId | string | Session ID from init. Optional. |
tokens | true: add the project's design-system tokens resolved per mode as `tokens` (`{ modes, values: { base, light, dark: { key: hex or number } } }`), with or without frames. Default false. |
execute_commands
Execute one or more commands by ID. Accepts an array of commands that share a single canvasId. Commands run sequentially, stopping on first error. Use command IDs from the skill docs. Pass previewIds + previewScale: 2 for inline PNG verification. Visually inspect every preview, describe what you see, fix issues. (External MCP clients: call `init` first for usage docs. Hosted-CLI and sub-agents have docs pre-loaded.)
| Parameter | Type | Description |
|---|---|---|
commands * | Array of commands to execute sequentially. | |
canvasId | string | Target canvas ID. Required for every canvas-scoped verb (enforced at dispatch, refused by name when missing); the workspace/app-level verbs (get_canvases, create_canvas, create_folder, list_keybinding… |
ids | Optional: element IDs applied to every command in the batch that names none of its own. The per-command `commands[i].ids` always wins. `elementIds` is accepted as an alias. | |
previewIds | Element IDs to include in a PNG preview returned alongside the summary. Omit for no preview. | |
previewScale | Scale factor for the preview image (default 1.0, max 3.0). Use 2.0 for verifying visual details like text or alignment. | |
project | string | Optional: run THIS call against a project other than the session's bound one: a name or key from list_projects (or an unambiguous name/handle substring), or the absolute path of a project folder (one… |
sessionId | string | Session ID for per-session visual feedback. Optional. |
get_knowledge
Load design knowledge by key. Blueprint DSL work loads it first; an html fence needs none. Pass keys from the available keys list returned by init (e.g. "blueprint/core", "design/colors", "effects/glass"). By default a key also pulls in its prerequisite docs (its `assumes:` deps); the response names them under "Also auto-loaded" so you can see what was bundled. Pass `includeDependencies: false` to load ONLY the keys you name (the skipped prerequisites are listed so you can request them deliberately).
| Parameter | Type | Description |
|---|---|---|
includeDependencies | Whether to auto-load each key's prerequisite docs (its `assumes:` deps). Default true. Set false to load exactly the keys you name and nothing else; the response lists the prerequisites it skipped so… | |
keys | List of knowledge keys to load. See available keys returned by init. | |
sessionId | string | Session ID for per-session tracking. Optional. |
init
Bootstrap a design session. Returns a unique session ID, session context (canvas ID, repo path), and documentation. Call this first. Pass the returned session ID as the `sessionId` argument on every subsequent `edit` / `read` call: this scopes your refs/design-system state AND gives you your own distinct labelled cursor on the canvas (concurrent agents that echo their IDs never share one cursor). Optionally pass a short `agentName` (2-3 words) to label that cursor. Pass `project` (a name or key from `list_projects`) to bind this session to a project OTHER than the one on screen — including a…
| Parameter | Type | Description |
|---|---|---|
agentName | string | Optional short display name (2-3 words) for this agent's canvas cursor. Clipped to 32 characters. |
project | string | Optional project to bind this session to: an exact name or key from `list_projects`, or an unambiguous name/handle substring, or the absolute path of a project folder (one holding .bl files, or an emp… |
vision | Whether this client can READ inline images (default true). Set false if you cannot see images: preview requests (a `preview()` row) then return a compact TEXTUAL render summary: each element's bounds… |
generate_image
Generate an AI image and apply it as a fill on targetElementId. Target element must already exist — create it first (top-level hosted-CLI agents: emit an `<edit>` block; sub-agents and external MCP clients: call `edit`), then call generate_image with that element's id or #ref. Call get_knowledge(["images/prompts","images/integration","images/references"]) for prompt engineering, quality presets, and parallel-generation guidance. Runs on your own Google key when one is set (Settings > Your own AI > Google), otherwise on Brilliant AI for a signed-in account.
| Parameter | Type | Description |
|---|---|---|
canvasId * | string | Canvas ID. Required. |
aspectRatio | string | Output aspect ratio: "1:1" (default) | "16:9" | "9:16" | "4:3" | "3:4". In batch mode applies to every target unless a target overrides it. |
imageSize | string | "1K" (default) | "2K" | "4K". |
prompt | string | Natural-language paragraph describing the image. |
referenceElementIds | Element IDs to use as reference images (up to 14). | |
sessionId | string | Session ID for per-session visual feedback. Optional. |
targetElementId | string | Element ID to apply the image fill to. Required unless targets is provided. |
targets | Batch mode: generate multiple images in parallel (preferred when generating 2+). |
generate_svg
Generate editable vector graphics (SVG) from a text prompt and place them on the canvas as native editable shapes. Use for icons, logos, illustrations, diagrams — anything that should stay crisp and remain editable. For photos / realistic images use `generate_image` instead. Optional `referenceElementIds` (up to 4) export to PNG and steer style. Use `n` (1–4) for parallel variations of a single prompt, or `targets` to fan out distinct prompts in parallel. Call get_knowledge(["svg/prompts","svg/integration"]) for prompt patterns and decision rules. Requires Quiver API key.
| Parameter | Type | Description |
|---|---|---|
canvasId * | string | Canvas ID. Required. |
instructions | string | Optional style/behavior instructions for the model. |
intent | string | A short present-tense line shown beside your cursor while the vector is drawn, e.g. 'Sketching a fox logo'. Optional; derived from the prompt when absent. |
n | Number of variations from the single prompt (1–4, default 1). Cheaper than `targets` because it is one API call. | |
prompt | string | Natural-language description of the SVG to generate. |
referenceElementIds | Element IDs to export as PNG and pass as style references (up to 4). | |
sessionId | string | Session ID for per-session visual feedback. Optional. |
targets | Batch mode: distinct prompts generated in parallel. Use for multiple different SVGs (e.g. "search icon", "settings icon"). |
vectorize_image
Convert a raster image element on the canvas into editable vector paths. The new vector elements are placed on the canvas; the original raster element is left untouched (delete it manually if no longer needed). Use for: importing PNG/JPEG content the user wants to edit as vectors, cleaning up screenshots into icons, or converting AI-generated raster images into editable shapes. Requires Quiver API key.
| Parameter | Type | Description |
|---|---|---|
canvasId * | string | Canvas ID. Required. |
sourceElementId * | string | Element ID (or `#ref`) of the raster element to vectorize. Required. |
autoCrop | Auto-crop the source image before vectorizing (default true). | |
sessionId | string | Session ID for per-session visual feedback. Optional. |
remove_background
Remove the background from real photos on the canvas: the subject keeps its exact pixels (the real face, the real product) and the background becomes transparent, in place, in the same image fill (crop, scale mode and opacity kept). Use it instead of generate_image whenever the image is a real photo and the user wants it cut out: "a real photo, keep the pixels, cut the background". generate_image regenerates the picture and invents new pixels. `ids`: the element ids (or #refs) whose image fills to cut (a frame, group or instance id reaches every image inside it); one request per distinct image…
| Parameter | Type | Description |
|---|---|---|
canvasId * | string | Canvas ID. Required. |
ids * | Element IDs (or #refs) holding the image fills to cut; a frame, group or instance id cuts every image inside it. Required. | |
sessionId | string | Session ID from init. Optional. |
add_cutout_outline
Add an outline around the subject of an image whose background was removed (remove_background first): the cutout's visible edge is traced into a new vector element placed directly above the image, aligned with its crop, rotation, flip and scale; stroke only, no fill, outside stroke, round joins (the sticker look). The outline is an ordinary element afterwards (restyle, move or delete it). `ids`: the image element ids (or #refs; a frame, group or instance id reaches the cut images inside it). `color`: optional #RRGGBB stroke color (default plain white). `width`: optional stroke width in px (def…
| Parameter | Type | Description |
|---|---|---|
canvasId * | string | Canvas ID. Required. |
ids * | Element IDs (or #refs) of images whose background was removed. Required. | |
color | string | Stroke color #RRGGBB. Optional. |
sessionId | string | Session ID from init. Optional. |
width | Stroke width in px. Optional. |
capture_ui
Screenshot a part of Brilliant's own UI (a toolbar, the palette / color picker, a panel) to an image file. Optionally stage commands to drive the UI into a state first, and draw highlight boxes over sub-targets. `target` is a capture-registry id such as "full-ui", "top-toolbar", "left-toolbar", "right-toolbar", "bottom-toolbar", "command-palette", or "ai-chat-panel". Chrome only by default on every host (the canvas area is left empty); pass includeCanvas:true (full-ui only) to composite the GPU canvas underneath. Writes lossless WebP by default. Desktop-only: it writes an image file, so it is…
| Parameter | Type | Description |
|---|---|---|
outputPath * | string | Absolute file path to write the image to. REQUIRED. |
target * | string | Capture-registry id to screenshot (e.g. "command-palette"). REQUIRED. "full-ui" is the whole window: menus, dropdowns, popovers, tooltips and dialogs included (they mount above the panels), so photogr… |
cropMargin | Logical pixels to expand the cropTo rect on all sides (clamped to image bounds). Default 0. | |
cropTo | string | Capture-registry id to crop the result down to. When set, "target" MUST be "full-ui": the full UI is captured (so the panel renders over the real backdrop with true colors), then cropped to this id's… |
dimBackground | Dim everything outside the highlight rects to 35% black. Default false. | |
format | string | Image format: "webp" (default, lossless) or "png". |
highlights | Boxes to draw over the capture. Each is either {target: "<registry-id>"} or {rect: [x, y, w, h]} in captured-image logical pixels. | |
includeCanvas | Composite the GPU canvas front buffer under the chrome. Only meaningful for target "full-ui". Default false. | |
pixelRatio | Device-pixel scale for the capture (default 2). | |
settleMs | Milliseconds to wait after staging before capturing (default 300). | |
stageCommands | Ordered commands to drive the UI into the desired state before capturing. Same command IDs execute_commands accepts. Executed sequentially; a failure aborts the capture. |
list_capture_targets
List the capture-registry ids currently mounted in Brilliant's UI (the valid "target"/"cropTo"/highlight ids for capture_ui). Takes no arguments. Returns a sorted JSON array; each entry is {id, mounted, rect: [x, y, w, h] in logical global pixels, children: [nested ids]}.
render_ui
Render a Brilliant UI component into an EXACT declarative state and capture it to an image file, offscreen, without touching the live app. `component` is a stager id (call list_stagers to enumerate them and their state schemas); `state` is the component-specific declarative state. Optionally draw highlight boxes over sub-targets (the scene registers "ui-stage.*" ids) and override the stage size. Writes lossless WebP by default. Desktop-only: it writes an image file, so it is not available in the web editor.
| Parameter | Type | Description |
|---|---|---|
component * | string | Stager id to render (e.g. "ai-chat-panel"). REQUIRED. Call list_stagers for the available ids and their schemas. |
outputPath * | string | Absolute file path to write the image to. REQUIRED. |
state * | Component-specific declarative state. REQUIRED. See the component's stateSchema from list_stagers. | |
background | Optional. true answers a `job:` id at once and runs the call on; wait({job}) blocks until it ends and answers its result. An edit waits its turn behind other agents' writes instead of refusing. Use it… | |
format | string | Image format: "webp" (default, lossless) or "png". |
height | Logical stage height override (defaults to the stager's defaultSize). | |
highlights | Boxes to draw over the render. Each is either {target: "<ui-stage.* id>"} or {rect: [x, y, w, h]} in captured-image logical pixels. | |
pixelRatio | Device-pixel scale for the capture (default 2). | |
width | Logical stage width override (defaults to the stager's defaultSize). |
list_stagers
List the UI Stage components render_ui can render, with each component's default logical size and its declarative state schema. Takes no arguments. Returns a JSON array; each entry is {component, defaultSize: [w, h], stateSchema}.
send_feedback
Open the Brilliant feedback card for the user to review and send. This does NOT send: the card opens, the user presses Send, and you tell them it is open and waiting (never claim it was sent). `message` is OPTIONAL (pre-fill a draft or open empty); `attachments` is tolerated but ignored (nothing about the user's world is ever attached). Feedback is a routing decision, not one surface, and consent scales with what leaves the machine: the user's words move by the user's act, the user's context moves only per-item opt-in, and your own observations ride telemetry, never GitHub or email. Offer it p…
| Parameter | Type | Description |
|---|---|---|
attachments | Ignored in this version; accepted for backward compatibility (nothing about the user's world is ever attached). | |
message | string | OPTIONAL. The drafted feedback message, in the user's own framing (the user can edit it before sending). Omit to open an empty card. |