fill
The Paint Bucket tool: fill at (x, y). contiguous=true (default) fills the connected area of the clicked color; false replaces that color everywhere in the cel. tolerance 0-255 also takes colors whose channels differ by at most that much. Optional dither pattern between color and color2. Fills on...
This record as markdown: /tools/pixmith-mcp/fill.md
What fill does on Pixmith
AI agents use fill to create or update resources in Pixmith, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Pixmith environment.
| Parameter | Type | Required | Description |
|---|---|---|---|
x | integer | Yes | |
y | integer | Yes | |
doc | string | — | Document id (see doc_list); optional when only one document is open. |
ink | string | — | simple (default; replaces pixels, transparent erases), alpha (blend over), lock_alpha (recolor only opaque pixels), behind (paint under existing pixels), shadin |
color | string | Yes | Color as "#RRGGBB" or "#RRGGBBAA" (also "#RGB", "#RGBA", "rgb(r,g,b)", "rgba(r,g,b,a)" with a in 0-1 or 0-255, a CSS basic name like "red", or "transparent"). A |
frame | integer | — | Frame (default: the active frame). |
layer | object | — | Layer index or name (default: the active layer). Must not be a group. |
color2 | string | — | Second color for patterns (default transparent). |
mirror | string | — | Symmetry: also draw mirrored (horizontal = left/right, vertical = top/bottom) across the canvas center, or across `mirror_axis_x` / `mirror_axis_y`. |
pattern | string | — | solid (default), checker (2x2 squares), dither25/dither50/dither75 (percent of `color`, the rest `color2`). |
tolerance | integer | — | 0-255: also fill colors whose R, G, B and A each differ by at most this (default 0 = exact). |
brush_size | integer | — | Brush size in pixels, 1-64 (default 1). |
Parameters from the server's own tool schema.
Why fill is rated Medium
An AI agent can call fill faster than any human can review: one bad instruction and it creates or modifies resources in Pixmith by the hundred, each call as confident as the last.
Risk signalsHigh parameter count (18 properties)
Attacks that exploit this kind of access
The rule that runs fill safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Pixmith, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For fill, this is the rule to start with:
fill stays usable, but capped: an agent stuck in a loop can't make hundreds of changes a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Pixmith, apply this rule, and every fill call is checked against it from then on.
Questions about fill
The Paint Bucket tool: fill at (x, y). contiguous=true (default) fills the connected area of the clicked color; false replaces that color everywhere in the cel. tolerance 0-255 also takes colors whose channels differ by at most that much. Optional dither pattern between color and color2. Fills only inside the selection when there is one. It is categorised as a Write tool in the Pixmith MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
fill accepts 12 parameters: x, y, doc, ink, color, frame, layer, color2, mirror, pattern, tolerance, brush_size. Required: x, y, color. The full parameter table on this page comes from the server's own tool schema.
Register the Pixmith MCP server in PolicyLayer and add a rule for fill: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Pixmith. Nothing to install.
fill is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.
Yes. Add a rate_limit block to the fill rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for fill. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
fill is provided by the Pixmith MCP server (pixmith-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Pixmith, and thousands of servers like it.
This server
Across the catalogue