Create image from shapes
create_image_from_shapesCreate an image from shapes you compose yourself, without a template. Use this when no template fits, or the user wants a one-off design: a banner, a label, an invoice. Set the canvas size in canvas, then pass shapes in draw order: the first shape is at the back, the last on top. Every shape has type, x, y, width and height, in pixels from the top left of the canvas. Types and their required field: text (text), image (src), qrcode (qrcode), barcode (barcode), icon (icon, an Iconoir name such as check-circle), table (columns and rows). frame and star need no extra field. Set colours, borders, padding and fonts in style, using CSS property names.
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": {
"shapes": "<shapes>"
},
"name": "create_image_from_shapes"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| canvas | No | ||
| format | No | Defaults to png. | |
| shapes | Yes | The shapes to draw, in draw order: the first is at the back, the last on top. |