filter
Apply an FX filter to a cel (default), every frame of a layer (target=layer) or every layer of a frame (target=frame), limited to the selection's bounds when something is selected or to region. Kinds and their parameters: replace_color (from_color, to_color, tolerance), invert, desaturate, hsl (h...
This record as markdown: /tools/pixmith-mcp/filter.md
What filter does on Pixmith
AI agents call filter to permanently remove resources in Pixmith, typically in cleanup and lifecycle workflows. It does its job in a single call, and there is no undo.
| Parameter | Type | Required | Description |
|---|---|---|---|
dx | integer | — | drop_shadow: offset (default 1). |
dy | integer | — | drop_shadow: offset (default 1). |
doc | string | — | Document id (see doc_list); optional when only one document is open. |
hue | integer | — | hsl: degrees -180..180. |
red | integer | — | color_balance: -255..255. |
blue | integer | — | color_balance: -255..255. |
halo | boolean | — | clean_edges halo pass: remove light, grayish paper-halo pixels from the outer rings (true, or give halo_rings). |
kind | string | Yes | clean_edges: FX > Clean Edges…; remove_background: FX > Remove Background… |
color | string | — | outline/drop_shadow: color (default black); remove_background: the background color (default: the dominant border color). |
frame | integer | — | Frame (default: active). |
green | integer | — | color_balance: -255..255. |
holes | integer | — | clean_edges: fill enclosed transparent areas smaller than this many pixels (0 = off; a transparent eye is a hole too). |
Parameters from the server's own tool schema.
Why filter is rated Critical
An AI agent that decides to call filter doesn't hesitate, doesn't double-check, and doesn't stop at one. Whatever it removes from Pixmith is gone. There is no undo for destructive operations.
Risk signalsHigh parameter count (49 properties) · Bulk/mass operation — affects multiple targets
Attacks that exploit this kind of access
The rule that runs filter 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 filter, this is the rule to start with:
filter is removed from the agent's tool list entirely, so the agent never calls it. The rest of the server keeps working.
The button opens the PolicyLayer dashboard: create your workspace, connect Pixmith, apply this rule, and every filter call is checked against it from then on.
Questions about filter
Apply an FX filter to a cel (default), every frame of a layer (target=layer) or every layer of a frame (target=frame), limited to the selection's bounds when something is selected or to region. Kinds and their parameters: replace_color (from_color, to_color, tolerance), invert, desaturate, hsl (hue -180..180, saturation and lightness -100..100), brightness_contrast (brightness, contrast -100..100), color_balance (red, green, blue offsets -255..255), outline (color, inside, eight_connected), drop_shadow (dx, dy, color), remove_isolated_pixels (eight_connected), blur, sharpen (3x3, alpha-aware), curves (curve_rgb / curve_red / curve_green / curve_blue / curve_alpha: [[x, y], ...] control points in 0-255), clean_edges (FX > Clean Edges…: tidy a sprite traced from reference art, never touching interior detail such as eyes, 1 px highlights or fingers; passes halo [halo_rings, halo_gain, halo_saturation], despeckle [pieces smaller than N pixels that touch the outside], holes [fill enclosed transparent areas smaller than N], light_specks, thin_outline [thickness, outline_color, outline_tolerance, outline_luma]; name no pass to run halo + despeckle + thin_outline with their defaults, otherwise only the passes you name run; use the read-only lint tool to see what is wrong first), remove_background (FX > Remove Background…: make the paper background transparent by flood fill from the border: tolerance 0-255 default 28, shadow [also a soft drop shadow, shadow_depth 1-95 percent], global [also enclosed background-colored pixels], color [background color; default the dominant border color]). preview=true returns an image of the result and changes nothing; with region the image is cropped to that region (the result says so). It is categorised as a Destructive tool in the Pixmith MCP Server, which means it can permanently delete or destroy data. Block by default and require explicit approval.
filter accepts 12 parameters: dx, dy, doc, hue, red, blue, halo, kind, color, frame, green, holes. Required: kind. 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 filter: 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.
filter is a Destructive tool with critical risk. Critical-risk tools should be blocked by default and only enabled with explicit human approval.
Yes. Add a rate_limit block to the filter 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 filter. 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.
filter 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.
Across the catalogue