compose
Build structurally valid page elements, sections, rows, and page skeletons from the builder factory instead of hand-writing nodes for storefront page assembly.
Instructions
Create element nodes from the factory (never hand-write nodes). Pick the operation with action and pass that action's arguments (help:true returns its full documentation and schema).
new_element: Build a single structurally-valid element node from the real builder factory.
new_section: Build a complete section node with children laid out in the builder's vertical grid.
new_row: Build a multi-column ROW container: children laid out SIDE BY SIDE (not stacked).
new_page_skeleton: Return an empty but valid page source: { sections: [] }. Add sections built with new_section, then save with build_page.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"action": "<action>"
},
"name": "compose"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hug | No | Content-sized columns (max-content): a menu, pills, a button group — not cards [new_row] | |
| help | No | Return the action's full documentation and argument schema instead of running it | |
| opts | No | Factory opts: { text, src, width, height, style, config, specials, events, bindings, responsive, … [new_element] | |
| type | No | Element type (see list_elements) [new_element] | |
| action | Yes | Which operation to run | |
| row_gap | No | Vertical gap (px) between wrapped rows (default 24) [new_row] | |
| children | No | Child element specs, stacked vertically in the section [new_section, new_row] | |
| collapse | No | Columns to show per breakpoint, e.g. [new_row] | |
| col_widths | No | Explicit per-column unit objects (length = #children), e.g. [new_row] | |
| column_gap | No | Horizontal gap (px) between columns (default 24) [new_row] | |
| section_opts | No | Optional factory opts for the section node itself [new_section] | |
| container_opts | No | Optional factory opts for the row container node itself (e.g. [new_row] |