Skip to main content
Glama

Paint: batch of operations

paint_ops

Run 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

TableJSON Schema
NameRequiredDescriptionDefault
opsYesOrdered list of {op, …params}
canvasYesCanvas name. Letters, digits, space, dot, dash, plus; the .png/.paint suffix may be included or omitted.
previewNoImage reply: auto/thumb = downscaled picture back into the result, full = unpixelated, none = text only
preview_sizeNoLongest edge of the returned thumbnail
stop_on_errorNoAbort at the first failing op (already-applied ops stay)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With annotations covering the mutation/safety profile (readOnlyHint=false, destructiveHint=false), the description adds real context beyond them: the return shape (summary line per op plus one preview) and undo semantics ('rolls back the whole batch step by step'). It also flags the layer-before-use ordering constraint, which the annotations do not.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core purpose, then the ops structure, layer note, example, and return/undo behavior in a logical order. Longer than a minimal sentence but each block (op list, example, return note) earns its place for a complex batch tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex nested-op tool with no output schema, the description covers purpose, item structure, layer handling, and return format adequately. Minor gaps remain (no mention of the 400-item cap or how op-level errors surface beyond stop_on_error), but the essential call-shaping context is present.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3, but the description adds substantial meaning: it enumerates the available op names, defines the {op, ...params} item shape, shows a concrete multi-op example, and explains the per-item 'layer' field. Op-specific parameters are deferred to the individual tools, which is a reasonable scope boundary.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Run many drawing operations in ONE call') and frames the benefit ('cheapest way to build a whole scene'). It explicitly distinguishes itself from the 16 sibling paint_* tools by noting every op also exists as its own tool, so an agent can route correctly without opening schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Clearly frames when to reach for this tool (multi-op scene in one call) versus the single-op siblings, and explains the layer prerequisite. It stops short of explicit when-not-use guidance (e.g., cost limits, maxItems of 400), but the batch-vs-single tradeoff is well conveyed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.