gradient
The Gradient tool: fill the selection (or the whole cel) with a linear or radial gradient from from to to, color_from to color_to; dither 2/4/8 uses an ordered Bayer pattern instead of smooth blending (pixel-art style).
This record as markdown: /tools/pixmith-mcp/gradient.md
What gradient does on Pixmith
AI agents call gradient as a supporting operation in Pixmith workflows.
| Parameter | Type | Required | Description |
|---|---|---|---|
to | array | Yes | Where color_to is reached [x, y]. |
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 |
from | array | Yes | Where color_from is [x, y] (the center for radial). |
kind | string | — | linear (default) or radial. |
frame | integer | — | Frame (default: the active frame). |
layer | object | — | Layer index or name (default: the active layer). Must not be a group. |
dither | integer | — | 0 smooth (default), or Bayer matrix size 2, 4 or 8 for an ordered dither between the two colors. |
mirror | string | — | Symmetry: also draw mirrored (horizontal = left/right, vertical = top/bottom) across the canvas center, or across `mirror_axis_x` / `mirror_axis_y`. |
color_to | 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 |
brush_size | integer | — | Brush size in pixels, 1-64 (default 1). |
color_from | 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 |
Parameters from the server's own tool schema.
Why gradient is rated Low
Without any rule in front of it, every call an agent makes to gradient happens silently: no trail, no cap, no way to know it misbehaved until something breaks downstream.
Risk signalsHigh parameter count (17 properties)
Attacks that exploit this kind of access
The rule that runs gradient 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 gradient, this is the rule to start with:
gradient gets a rate cap, and 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 gradient call is checked against it from then on.
Questions about gradient
The Gradient tool: fill the selection (or the whole cel) with a linear or radial gradient from from to to, color_from to color_to; dither 2/4/8 uses an ordered Bayer pattern instead of smooth blending (pixel-art style). It is categorised as a Other tool in the Pixmith MCP Server, which means it performs auxiliary operations.
gradient accepts 12 parameters: to, doc, ink, from, kind, frame, layer, dither, mirror, color_to, brush_size, color_from. Required: to, from, color_to, color_from. 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 gradient: 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.
gradient is a Other tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the gradient 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 gradient. 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.
gradient 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