agentbrush_edit_mask
Open a browser-based mask editor for spatial precision edits on an existing image, then block until the user accepts a result. Use this instead of agentbrush_generate when the change requires repositioning, area-specific modifications, removing or adding elements in a specific region, or any edit...
This record as markdown: /tools/dev-agentbrush-mcp-server/agentbrush-edit-mask.md
What agentbrush_edit_mask does on Mcp Server
AI agents invoke agentbrush_edit_mask to trigger actions in Mcp Server. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call: builds kicked off, notifications sent, workflows started.
| Parameter | Type | Required | Description |
|---|---|---|---|
image_path | string | Yes | Absolute path to the image to edit |
instruction | string | Yes | What should change in the masked area (max 500 chars) |
quality_hint | string | — | Quality level for the edit: low=1 token, medium=5 tokens (default), high=20 tokens at 1024×1024. |
Parameters from the server's own tool schema.
Why agentbrush_edit_mask is rated High
This tool triggers an external browser-based operation (opens a browser tab, blocks execution for up to 30 minutes waiting for user interaction) and produces a modified image artifact. It spans Write (modifies an existing image) and Execute (triggers browser actions and external operations). Per the rules, Execute is more severe than Write, so Execute is selected.
From the tool's definition Open a browser-based mask editor... then block until the user accepts a result... The tool opens a browser tab where the user draws a mask... Returns the edited image path
Attacks that exploit this kind of access
The rule that runs agentbrush_edit_mask safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Mcp Server, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For agentbrush_edit_mask, this is the rule to start with:
agentbrush_edit_mask stays usable, but rate-capped: a runaway agent can't fire it dozens of times a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Mcp Server, apply this rule, and every agentbrush_edit_mask call is checked against it from then on.
Questions about agentbrush_edit_mask
Open a browser-based mask editor for spatial precision edits on an existing image, then block until the user accepts a result. Use this instead of agentbrush_generate when the change requires repositioning, area-specific modifications, removing or adding elements in a specific region, or any edit that text prompts alone cannot express. How it works: 1. The tool opens a browser tab where the user draws a mask over the area to modify. 2. The user describes the change and submits the edit. 3. The tool blocks while the user edits (up to 30 minutes). 4. Returns the edited image path, token cost, and remaining balance when the user accepts a result. If you want to hand the editor URL to the user and continue working while they draw, call agentbrush_edit_mask_open instead and then agentbrush_edit_mask_result to retrieve the image. Requires authentication — run agentbrush_login first if not authenticated. image_path must be an absolute path to an existing image file within the project. instruction describes what should change in the masked area (max 500 characters). quality_hint: low=1 token, medium=5 tokens (default), high=20 tokens at 1024×1024. It is categorised as a Execute tool in the Mcp Server MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.
agentbrush_edit_mask accepts 3 parameters: image_path, instruction, quality_hint. Required: image_path, instruction. The full parameter table on this page comes from the server's own tool schema.
Register the Mcp Server MCP server in PolicyLayer and add a rule for agentbrush_edit_mask: 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 Mcp Server. Nothing to install.
agentbrush_edit_mask is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.
Yes. Add a rate_limit block to the agentbrush_edit_mask 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 agentbrush_edit_mask. 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.
agentbrush_edit_mask is provided by the Mcp Server MCP server (@agentbrush/mcp-server). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Mcp Server, and thousands of servers like it.
Across the catalogue