Compose and print a page
layout_pagePlace images, text and shapes on a page in millimetres, centre them, repeat them in a grid, then preview before printing. Adjust the layout until the preview looks right, then send it to the printer.
Instructions
Place images, text and shapes on a page in millimetres (centred, side by side, repeated in a grid such as 2 x 4 ID cards, edge to edge), then preview it and/or print it. Images should be cleaned with image_edit first. Default: returns a preview and prints nothing; call again with print:true when it looks right. Items: image {source,x_mm,y_mm,width_mm,height_mm,fit,align,center_x,center_y,rotate_deg,opacity,border_mm,radius_mm}, text {text,x_mm,y_mm,width_mm,font_size_pt,font,color,bold,italic,underline,align,line_height,rotate_deg}, shape {shape:rect|ellipse|line,x_mm,y_mm,width_mm,height_mm,fill,stroke,stroke_mm,radius_mm}, copies {of:,rows,cols,gap_mm}.
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": {
"items": "<items>"
},
"name": "layout_page"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| color | No | ||
| items | Yes | Drawn in order, later items on top. Coordinates are mm from the top-left of the page (or of the margin box) | |
| paper | No | A4 (default), A5, A6, letter, legal, 4x6, 5x7, photo-l, or "WxHmm" | |
| No | Send to the printer. Default false | ||
| copies | No | Number of sheets | |
| duplex | No | ||
| dry_run | No | With print: validate and report the plan, move no paper | |
| preview | No | Return page images. Default true when print is false | |
| printer | No | Name, id, IP or alias. Omit: the server picks | |
| quality | No | ||
| save_as | No | Also keep the rendered page as a .png or .pdf file at this path (never overwrites) | |
| margin_mm | No | Inset the design by this margin; turns borderless off | |
| background | No | CSS colour, default white | |
| borderless | No | Default true: print exactly as laid out, edge to edge where the printer supports it | |
| orientation | No |