convert_html
Convert HTML with inline CSS into Brilliant blueprint lines per frame, optionally returning laid-out element boxes and design tokens, without creating anything on the canvas.
Instructions
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 across frames, the handle a motion patch line leads with as #name); id="x" is a #x ref as in edit (html). Give the outermost element an explicit px width and height so percentage sizes and offsets resolve. Same CSS support as edit (html), plus transform translate()/scale()/rotate() (fractional degrees) folded into p()/s()/rot().
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "convert_html"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| html | No | One HTML string (the one-frame form of `frames`). | |
| frames | No | HTML strings to convert, one per frame, in order. At most 1000 per call and 16 MiB in total. | |
| layout | No | true: build each frame into a throwaway world and answer the laid-out boxes (`elements` per frame). Default false. | |
| tokens | No | 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. | |
| project | No | 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 | No | Session ID from init. Optional. |