Skip to main content
Glama

Paint: Bucket fill / recolour

paint_fill

Flood-fills a canvas region with a specified color, using tolerance and contiguous settings to control which matching pixels are affected. Targets a named canvas or layer.

Instructions

Paint bucket. tolerance is summed channel distance (0 = exact, 60 ≈ shades of the same hue). contiguous:false hits every matching pixel of the layer; mode:'replace' swaps the colour instead of painting over it.

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
modeNoover
blendNoBlend mode for this strokenormal
colorYes
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.
opacityNo0..1 strength of this stroke
previewNoImage reply: auto/thumb = downscaled picture back into the result, full = unpixelated, none = text only
toleranceNo
contiguousNo
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?

With annotations only declaring the safety flags, the description adds real behavioral context beyond them: the meaning of tolerance as summed channel distance, that contiguous:false affects every matching pixel of the layer, and that mode:'replace' swaps rather than overpaints. It stops short of discussing return/preview behavior or cost on large canvases.

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-loads the core identity ('Paint bucket.'), then devotes each sentence to a distinct parameter behavior with no filler. The closing line about layers/filters/undo is slightly generic but still useful orientation.

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 12-parameter tool with no output schema, the description foregrounds the confusing semantics and relocates return-format detail to the preview parameter. What an agent needs to invoke a bucket fill correctly is essentially 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 covers ~50% of params by description, and the prose compensates by explaining the three undocumented non-obvious ones (tolerance, contiguous, mode) with concrete examples ('60 ≈ shades of the same hue'). x/y/color are self-evident and blend/opacity/preview already carry schema descriptions.

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?

Opens with a specific verb+resource, 'Paint bucket', which unmistakably identifies a flood-fill/recolour operation and implicitly separates it from the line/rect/brush/path siblings. It does not explicitly name a contrasting sibling, keeping it just 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?

Usage is implied rather than stated: it notes the canvas is 'created with paint_canvas' and that layers/filters/undo behave uniformly, but gives no explicit when-to-use-this vs paint_pixels/paint_rect guidance or prerequisites. Adequate but with clear gaps.

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