Skip to main content
Glama

flood_fill

Fill a contiguous area of matching pixels from a seed point with a new color in one undoable action. Use for bucket fills without affecting neighboring regions.

Instructions

Fills a contiguous area of matching pixels starting from (x, y) with color in a single undo transaction.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYesSeed point X
yYesSeed point Y
colorYesNew fill color (hex)
layerNameNo
toleranceNoColor tolerance (0-255)
layerIndexNo
frameNumberNo
returnPreviewNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations, the description carries full burden, and it does disclose one valuable trait: the fill occurs in a single undo transaction. However it is silent on layer/frame targeting rules, how tolerance affects matching, and whether an active sprite/layer must already be selected.

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?

One tight sentence with the seed point and the undo-transaction detail front-loaded; no filler. Size is appropriate for the operation, though it trades some needed detail for brevity.

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

Completeness2/5

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

For an 8-parameter mutation tool with no annotations and no output schema, the description leaves half the parameters unexplained and says nothing about targeting a layer/frame or what returnPreview returns. It is under-specified for the complexity of the call.

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

Parameters2/5

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

Schema coverage is only 50%: x, y, color, and tolerance are documented in the schema, but layerName, layerIndex, frameNumber, and returnPreview have neither schema nor description guidance. The description repeats the seed-point and color semantics already in the schema and adds nothing for the undocumented layer/frame targeting parameters.

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 (Fills) and resource (contiguous area of matching pixels) and names the seed point, which is more precise than a generic 'fill'. It implicitly contrasts with siblings like replace_color and set_pixels, but never names them, so the differentiation is left to inference.

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?

The description implies when flood fill applies (contiguous matching region from a seed), but offers no explicit when-to-use vs when-not, and does not point to replace_color for global replacement or to drawing tools for shapes. Usage is implied by the well-known operation rather than stated.

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