Generate layout variants
generate_layoutComputes editable layout variants from canvas size and screenshots using pure geometry, keeping protected images visible, and can optionally apply a chosen variant to a page.
Instructions
Compute one or more editable layout variants (operations for apply_operations) for a canvas and a set of screenshots. Pure geometry: no remote model, no pixel generation. Placements keep protected screenshots fully visible, upright and unobstructed unless the user granted otherwise. Optionally apply a variant directly to a 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": {
"assetIds": "<assetIds>"
},
"name": "generate_layout"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | Copy to place; placeholders otherwise. | |
| apply | No | Apply this variant to pageId (replace clears the page first). | |
| brand | No | Override the project brand for this call. | |
| frame | No | Device frame (default: chosen per screenshot aspect). | |
| style | No | Layout style, or "auto". | |
| width | No | ||
| height | No | ||
| margin | No | Safe margin in px (default 6% of the shorter side). | |
| pageId | No | Target page; its canvas size is used when width/height are omitted. | |
| project | No | Project whose assets/brand to use (required to resolve asset ids). | |
| assetIds | Yes | Screenshot asset ids, in reading order. | |
| textArea | No | ||
| variants | No | Number of variants (default 2). | |
| frameColor | No | ||
| logoAssetId | No |