Skip to main content
Glama

paint_fill

Fills a raster layer or active selection with solid color, flood color, linear/radial gradients, or transparency; use polygon points to constrain fills and gradients.

Instructions

Fill a raster layer (layer_id or active) within the selection, and within the polygon points when given (smooth=true: a curve through them) - a gradient for one shape needs no separate selection. Gradient start/end or flood point in document pixels; a gradient covers the whole allowed area (end colours continue beyond start/end). Opacity 0..1. Flood samples the target layer or merged painting. kind=clear erases the selection/polygon (or whole layer) to transparency; opacity<1 erases partially; clearing an alpha-locked layer is an error.

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": "paint_fill"
  }
}

Input Schema

NameRequiredDescriptionDefault
endNo
kindNosolid
colorNo
pointNo
startNo
color2No#FFFFFF
pointsNo
smoothNo
opacityNo
layer_idNoTarget layer id or unique layer name; the active layer stays unchanged. Default: active layer
toleranceNo
blend_modeNonormal
document_idNoTarget this document instead of the shared active one (recommended when several agents share the server)
sample_mergedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A3.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose real behavior: gradient end colours continue beyond start/end, opacity<1 partially erases in clear mode, and clearing an alpha-locked layer is an error. It omits blend_mode interaction, tolerance effects, and whether the operation is undoable/returns anything.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action and information-dense with little true waste, but it is a single run-on paragraph using dashes and parentheses that is hard to parse on a quick read. Restructuring into short labeled clauses would improve it without adding length.

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, no-annotation, no-output-schema mutation tool, the description covers the major modes and one failure case but leaves tolerance, blend_mode, and the return/undo behavior undocumented. An agent could call it but might mis-set tolerance or blend_mode without experimentation.

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 only 14% across 14 parameters, and the description compensates for several: layer_id vs active, document-pixel units for start/end/point, points+smooth, opacity range 0..1, sample_merged for flood. However tolerance, blend_mode, color/color2 roles, and document_id (only described in schema) are left unaddressed, so the compensation is partial.

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 and resource: fill a raster layer (layer_id or active) within selection or polygon, with the kind variants solid/flood/linear/radial/clear spelled out. It doesn't explicitly say how it differs from siblings like paint_brush or paint_shape, so it falls short of the 5 bar.

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 some implied routing: a gradient for one shape needs no separate selection, flood samples the target layer or merged painting, smooth=true draws a curve through the points. But there is no explicit when-to-use-this-vs-paint_brush/paint_shape/paint_selection guidance and no stated exclusions or prerequisites.

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