Skip to main content
Glama

Paint: Rectangle

paint_rect

Draw filled or outlined rectangles on a canvas. Supports rounded corners, solid fills, gradients, and layer targeting.

Instructions

Filled and/or outlined rectangle. radius rounds the corners (number, or [top-left, top-right, bottom-right, bottom-left]). fill/stroke take a colour or a gradient object.

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
xYes
yYes
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).
widthYes
canvasYesCanvas name. Letters, digits, space, dot, dash, plus; the .png/.paint suffix may be included or omitted.
heightYes
radiusNoCorner radius in pixels
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
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, idempotentHint=false, so the write-safety profile is covered. The description adds useful behavior—corner rounding semantics and that fill/stroke accept a colour or gradient object—but omits what happens to existing canvas content and how the image preview reply is produced.

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 short paragraphs that front-load what the tool draws, followed by targeting details. Sentences are efficient, though the trailing layers/filters/undo sentence is somewhat generic boilerplate.

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 14-parameter drawing tool with no output schema, the description covers canvas targeting, layer selection, rounding, and fill/stroke types. It is adequate but leaves assorted parameters (blend, opacity, preview output behavior) to the schema.

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 coverage is 64%, so the schema documents many parameters itself. The description meaningfully clarifies the radius array ordering and that fill/stroke accept colour or gradient, adding value, but several params (blend, opacity, preview, stroke_width, layer) get no treatment in the description.

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 description states a specific verb+resource ('Filled and/or outlined rectangle') and details how it is shaped (radius, fill/stroke), which lets an agent distinguish it from shape siblings like paint_ellipse or paint_polygon. It does not explicitly name an alternative for the same task, so it falls short of a 5.

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 gives context for targeting ('Target the canvas by name (created with paint_canvas)') and notes layers/filters/undo behave uniformly across drawing tools, which implies shared usage. However, there is no explicit when-to-use-this-vs-another-shape guidance or exclusion conditions.

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