Design editable canvas content
canvas_write_htmlCreate a populated screen or visual group from safe HTML/CSS. For multiple screens, publish the first populated screen before authoring the next, then publish each subsequent screen separately so the user can see and steer progress. Prepare only what that screen needs; do not prepare the whole set before the first write. Returns the committed version and root node without an extra read or render. If starting state is unknown, call capability_query with {"capability":"canvas.read","input":{"canvasId":""}}. When nodeCount is 0, use targetNodeId "root" and the returned version. Use flex, padding, gap, concrete inline CSS and layer-name. Give important rows/cards/buttons explicit dimensions; avoid implicit stretch, margins, grid, tables and inline badge backgrounds. Include real content, not an empty shell. Reuse a returned version for subsequent edits; read a targeted subtree only when its ids or structure are unknown. Use canvas_edit for small changes, then canvas_render once at a useful review point. The schema here is executable; no search or describe is required.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| html | Yes | Exactly one safe top-level HTML/CSS visual group to compile into editable nodes. | |
| mode | No | insert-children | |
| canvas | Yes | Canvas UUID or complete canvas/page/selection URL. Preserve every supplied page and selection. | |
| idPrefix | No | Optional namespace for generated IDs. Choose a fresh prefix for each new import or replacement; reuse only for an identical retry. | |
| baseVersion | Yes | ||
| clientToken | No | Reuse only when retrying this exact mutation. | |
| targetNodeId | Yes | Stable container id for insert-children, or subtree root id for replace. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||