Paint: batch of operations
paint_opsRun multiple drawing operations in a single call and get one composited image back, letting you build entire scenes in one step.
Instructions
Run many drawing operations in ONE call and get ONE picture back — the cheapest way to build a whole scene.
ops is a list of {op: "", ...that op's parameters}. Available ops: rect, ellipse, line, polygon, path, brush, text, pixel_grid, pixels, fill, gradient, stamp, clear, filter, transform, layer. Every op also exists as its own tool (paint_rect, paint_brush, …) with the same fields. Optional per-item "layer" picks the layer; add layers first with paint_layer or inline via {op:"layer", action:"add"}.
Example: ops: [ {op:"gradient", type:"linear", colors:["#0b1d3a","#3b6fb5"]}, {op:"ellipse", cx:600, cy:120, radius:46, fill:"#ffe27a"}, {op:"path", d:"M0 300 L120 220 L260 300 Z", fill:"#233"}, {op:"text", text:"NIGHT RUN", x:320, y:40, scale:6, color:"#fff"} ]
Returns a summary line per operation plus one preview of the result. Undo rolls back the whole batch step by step.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ops | Yes | Ordered list of {op, …params} | |
| canvas | Yes | Canvas name. Letters, digits, space, dot, dash, plus; the .png/.paint suffix may be included or omitted. | |
| preview | No | Image reply: auto/thumb = downscaled picture back into the result, full = unpixelated, none = text only | |
| preview_size | No | Longest edge of the returned thumbnail | |
| stop_on_error | No | Abort at the first failing op (already-applied ops stay) |