Skip to main content
Glama

Paint: Clear or erase an area

paint_clear
Destructive

Clears rectangular or elliptical areas on a canvas layer to a color, or erases to transparency; can also clear the entire layer.

Instructions

Wipes a rectangle (whole layer when area omitted) to color; color:null erases to transparency. shape:'ellipse' and radius round the mask.

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
areaNoRestrict to a rectangle; omit for the whole canvas
colorNoFill colour, or null to erase to transparent
layerNoTarget layer index; defaults to the active layer (see paint_canvas).
shapeNorect
canvasYesCanvas name. Letters, digits, space, dot, dash, plus; the .png/.paint suffix may be included or omitted.
radiusNo
opacityNo
previewNoImage reply: auto/thumb = downscaled picture back into the result, full = unpixelated, none = text only
preview_sizeNoLongest edge of the returned thumbnail

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, so the safety profile is covered; the description adds that a null color erases to transparency and that `shape:'ellipse'` with `radius` rounds the mask. It also reassures that undo and layers behave consistently across drawing tools, which is useful non-obvious context, though it doesn't state reversibility or side effects of the wipe explicitly.

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?

Four short clauses front-load the core wipe/erase behavior before the secondary shape and canvas targeting details. No redundant filler, though the last sentence about layers/filters/undo is slightly generic.

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 9-parameter mutation tool with no output schema and no annotations on required auth, the description covers the essential behavioral contract: what gets wiped, what null color does, and how targeting works. Missing only minor details like opacity interactions and preview semantics, which the schema already handles.

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?

At 67% schema coverage it goes beyond the schema by explaining the omitted-`area` fallback, the null-color erase behavior, and how `shape` and `radius` interact to round the mask. It does not explain `opacity` or the preview options, but the schema already documents those.

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?

States a specific verb+resource ("Wipes a rectangle ... to `color`") and the erase-to-transparency semantics, which distinguishes it from a plain fill. However, it never names sibling tools like paint_fill, paint_rect or paint_pixel_grid, so an agent must infer the boundary itself.

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?

Gives useful conditional behavior (whole layer when `area` omitted, transparency when `color:null`) and the canvas prerequisite ("created with paint_canvas"), but offers no explicit when-to-use-this-instead-of-X guidance against the many overlapping paint_* siblings.

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