Skip to main content
Glama

Fill

fill

Apply a paint-bucket flood at x,y by color similarity, or cover a selection or whole layer with a color, gradient, or pattern while respecting active selections.

Instructions

Paint-bucket flood fill at (x,y) (mode "flood", region found by color similarity on the composite or the layer), or fill the whole selection/layer (mode "all") with a color, gradient or pattern. Respects the selection.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "fill"
  }
}

Input Schema

NameRequiredDescriptionDefault
xNo
yNo
modeNoflood (needs x,y) or all (selection or whole layer). Default: flood if x given
blendNo
colorNoCSS color string, or gradient/pattern object {type:"linear", from:[x,y], to:[x,y], stops:[...]} | {type:"radial", cx, cy, r, stops} | {type:"conic", cx, cy, angle, stops} | {type:"pattern", pattern:"hatch", color, spacing, angle}. Coordinates are canvas px.
layerNoLayer id, name, or index (0 = bottom, -1 = top). Default: the active layer.
paintNoAlias of color
expandNoGrow the flood region by px (default 1, tucks under line art)
sampleNoDetect the region on the visible composite (default) or this layer only
targetNo
opacityNo
antialiasNoSoften flood edges (default true)
toleranceNoFlood color tolerance 0..255 (default 32)
contiguousNofalse = all similar pixels anywhere

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?

No annotations are supplied, so the description carries the full burden. It usefully discloses that the flood region is found by color similarity on the composite or the layer, and that the selection constrains the fill, but it says nothing about undo/irreversibility, what is returned, or side effects on the layer/mask — significant for a mutation tool with zero annotation coverage.

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 dense sentences with the primary operation and mode distinction front-loaded; no filler. The nested parentheticals make it slightly harder to parse, but every clause conveys actionable information.

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 mutation tool with no annotations and no output schema, the definition covers the core semantics (coordinates, modes, paint source, selection respect) but omits return behavior and the interaction of tolerance/contiguous/expand with the flood region. Adequate but with clear gaps.

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 already documents most parameters (tolerance, expand, contiguous, sample, antialias, blend, opacity). The description adds meaning for mode and confirms that color accepts CSS strings or gradient/pattern objects, but leaves the remaining behavior-shaping parameters (contiguous, expand, target) to the schema alone.

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 names a specific verb (flood fill) and resource (pixels at x,y or selection/layer) and cleanly splits the two operating modes, flood vs all. It does not differentiate the tool from siblings such as stroke, shape, or filter, so it stops 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 tells the agent how the two modes differ (flood needs x,y; all fills the selection or whole layer) and that the selection is respected, which implies when each mode applies. It gives no explicit when-to-use guidance against alternatives like stroke or shape, and no exclusion conditions.

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