# agentbrush_edit_mask_open

Open a mask editor session and return the editor URL immediately, without blocking. Prefer agentbrush_edit_mask for most cases — it blocks and returns the edited image automatically when the user accepts. Use this non-blocking variant only if you must keep working while the user draws. IMPORTANT: the edited image is NOT delivered to you until you call agentbrush_edit_mask_result with the returned session_id. Call it right after handing over the URL so the result is retrieved as soon as the user finishes (it keeps polling until they Accept and Finish). The tool best-effort opens the system default browser to the editor URL and also returns the URL as text so the agent can relay it. 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.

Agent View of the PolicyLayer registry record for `agentbrush_edit_mask_open`. HTML page: https://policylayer.com/tools/dev-agentbrush-mcp-server/agentbrush-edit-mask-open

## Facts

- Tool: `agentbrush_edit_mask_open`
- Server: Mcp Server (`@agentbrush/mcp-server`) — https://policylayer.com/tools/dev-agentbrush-mcp-server.md
- Install: `npx -y @agentbrush/mcp-server`
- Homepage: https://www.npmjs.com/package/@agentbrush/mcp-server
- Risk category: Execute (High risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 3 (2 required)
- Recommended policy verdict: Rate-limited

## Parameters

| 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 | no | 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.

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "agentbrush_edit_mask_open",
    "arguments": {
      "image_path": "<image_path>",
      "instruction": "<instruction>"
    }
  }
}
```

## Why agentbrush_edit_mask_open is rated High

This tool initiates an external editor session, triggering an external operation (opening a mask editor and generating a session URL). It doesn't merely read data, nor does it write/create a final artifact directly — it launches an interactive external process.

From the tool's own definition: "Open a mask editor session and return the editor URL immediately, without blocking... the edited image is NOT delivered to you until you call agentbrush_edit_mask_result with the returned session_id"

## Use case

AI agents invoke agentbrush_edit_mask_open 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.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Mcp Server:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "agentbrush_edit_mask_open": {
      "limits": [
        {
          "counter": "agentbrush_edit_mask_open_rate",
          "window": "minute",
          "max": 10,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on Mcp Server (11)

- `agentbrush_remove_background` — Destructive — https://policylayer.com/tools/dev-agentbrush-mcp-server/agentbrush-remove-background.md
- `agentbrush_edit_mask` — Execute — https://policylayer.com/tools/dev-agentbrush-mcp-server/agentbrush-edit-mask.md
- `agentbrush_check_status` — Read — https://policylayer.com/tools/dev-agentbrush-mcp-server/agentbrush-check-status.md
- `agentbrush_list_presets` — Read — https://policylayer.com/tools/dev-agentbrush-mcp-server/agentbrush-list-presets.md
- `agentbrush_list_references` — Read — https://policylayer.com/tools/dev-agentbrush-mcp-server/agentbrush-list-references.md
- `agentbrush_edit_mask_result` — Write — https://policylayer.com/tools/dev-agentbrush-mcp-server/agentbrush-edit-mask-result.md
- `agentbrush_generate` — Write — https://policylayer.com/tools/dev-agentbrush-mcp-server/agentbrush-generate.md
- `agentbrush_init` — Write — https://policylayer.com/tools/dev-agentbrush-mcp-server/agentbrush-init.md
- `agentbrush_login` — Write — https://policylayer.com/tools/dev-agentbrush-mcp-server/agentbrush-login.md
- `agentbrush_populate_identity` — Write — https://policylayer.com/tools/dev-agentbrush-mcp-server/agentbrush-populate-identity.md
- `agentbrush_save_as_reference` — Write — https://policylayer.com/tools/dev-agentbrush-mcp-server/agentbrush-save-as-reference.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=dev-agentbrush-mcp-server · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/dev-agentbrush-mcp-server
