Skip to main content
Glama

Paint: Polygon or polyline

paint_polygon

Draw filled or outlined polygons from [x,y] point lists on a named canvas—ideal for stars, arrows, and speech bubbles, with optional layers and gradients.

Instructions

Any many-sided shape from [x,y] points — stars, arrows, speech bubbles. closed:false strokes the outline only.

Target the canvas by name (created with paint_canvas) and optionally a layer index. Layers, filters and undo work the same for every drawing tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fillNoA colour, or a gradient object {type, from, to, radius, colors|stops}
blendNoBlend mode for this strokenormal
layerNoTarget layer index; defaults to the active layer (see paint_canvas).
canvasYesCanvas name. Letters, digits, space, dot, dash, plus; the .png/.paint suffix may be included or omitted.
closedNo
pointsYesCorners as [[x,y], …]
strokeNoA colour, or a gradient object {type, from, to, radius, colors|stops}
opacityNo0..1 strength of this stroke
previewNoImage reply: auto/thumb = downscaled picture back into the result, full = unpixelated, none = text only
even_oddNoEven-odd rule, needed for self-crossing stars
preview_sizeNoLongest edge of the returned thumbnail
stroke_widthNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and idempotentHint=false, so the mutation/safety profile is covered. The description adds the useful semantic that closed:false strokes the outline only, but omits behavioral traits the annotations don't cover, such as the cost/limits of up to 20,000 points, or how preview replies affect the response.

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?

Two tight paragraphs with the core capability front-loaded and zero filler; the second paragraph neatly packages prerequisites and cross-tool consistency. Slightly compressed at the expense of routing guidance, but nothing is wasted.

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

Completeness3/5

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

For a 12-parameter mutation tool with no output schema, the description covers the essentials (canvas targeting, closed behavior, undo consistency) and the schema carries most parameter detail at 83% coverage. It still leaves gaps around point-count limits and how the preview parameter changes the returned result, which an agent would want before calling it.

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

Parameters3/5

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

Schema description coverage is 83%, so the baseline is 3. The description does add meaning beyond the schema for closed (which has no schema description at all: 'closed:false strokes the outline only') and restates the points format, but it says nothing about the gradient, blend, opacity, or preview parameters that the schema documents.

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

Purpose4/5

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

The opening line gives a specific verb+resource ('Any many-sided shape from [x,y] points') and concrete examples (stars, arrows, speech bubbles) that separate it from the fixed-shape siblings like paint_rect and paint_ellipse. It never names an alternative tool by name, so the differentiation is inferential rather than explicit.

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

Usage Guidelines3/5

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

It states a prerequisite ('Target the canvas by name (created with paint_canvas)') and a cross-tool invariant (layers, filters and undo work the same for every drawing tool), which is genuinely useful context. However it never says when to prefer this over paint_path, paint_line, or paint_rect, so an agent choosing between free-form drawing tools gets no routing guidance.

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