Skip to main content
Glama

draw_shapes

Draw anti-aliased vector primitives, lines, curves, rectangles, ellipses, polygons, and text onto a Krita paint layer to build ordered geometric artwork.

Instructions

Draw vector-style primitives (anti-aliased) onto a paint layer, in order (max 5000 per call). Every shape has "type" and optional "opacity" (0..1). Types: line {x1,y1,x2,y2,color,stroke_width} polyline {points:[[x,y],...],color,stroke_width} bezier {points:[start, c1,c2,end, c1,c2,end ...],color,stroke_width} (1+3n points) rect {x,y,width,height,radius?,fill?,stroke?,stroke_width?,gradient?} ellipse {cx,cy,rx,ry,fill?,stroke?,stroke_width?,gradient?} polygon {points:[[x,y],...],fill?,stroke?,stroke_width?,gradient?} text {x,y,text,size(px),font?,bold?,color} (x,y = baseline-left) For closed shapes color is the fill when neither fill nor stroke is given. gradient: {"type":"linear","x1","y1","x2","y2","stops":[[0,"#fff"],[1,"#000"]]} or {"type":"radial","cx","cy","r","stops":[...]}. layer = id or name of a paint layer (default: active layer). These are crisp geometric shapes; for painterly marks use brush_stroke.

Input Schema

NameRequiredDescriptionDefault
layerNo
shapesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations the description carries the full burden, and it discloses a lot: draw order, a 5000-shape cap, anti-aliased rasterization onto a paint layer, coordinate convention (baseline-left for text), and the fill/stroke fallback for color. It still omits whether drawing mutates or overwrites existing pixels, whether the result is undoable, and what happens if the named layer does not exist.

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 action and limits, then a compact per-type field table that earns its space as a payload specification. The density is justified by the unstructured item schema, though the type block is reference-manual style rather than narrative.

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?

Given no annotations, no output schema, and a free-form array payload, the description supplies nearly everything needed to construct a valid call. Missing only return-value expectations (shape ids/counts) and failure behavior for bad layer references or malformed points.

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

Parameters5/5

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

Schema coverage is 0%, so the description must compensate and does: it enumerates every shape type with its exact field set, documents the 1+3n bezier point rule, the gradient object forms, and defines the layer parameter as an id or name with active-layer default.

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 ('Draw vector-style primitives ... onto a paint layer') plus the ordering and volume bounds. The closing line distinguishes it from brush_stroke, so an agent can pick between the two without opening either schema.

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?

Names the sibling alternative and the condition selecting it ('for painterly marks use brush_stroke'), and gives the default-targeting rule ('default: active layer'). It does not address how it relates to other shape tools such as add_svg, list_vector_shapes, or remove_vector_shapes.

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