# agentbrush_edit_mask_result

Block until the mask editor session reaches "completed" (the user accepted a result), then download and save the edited image. Pair with agentbrush_edit_mask_open. Blocks for up to 30 minutes (matching the signed editor URL lifetime); returns immediately when the user accepts. session_id is the UUID returned by agentbrush_edit_mask_open. image_path is optional. Pass the same path you handed to _open so the result is saved alongside it; otherwise the saved file lands in the current working directory.

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

## Facts

- Tool: `agentbrush_edit_mask_result`
- 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: Write (Medium risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 2 (1 required)
- Recommended policy verdict: Rate-limited

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `image_path` | string | no | Optional absolute path of the original source image. When provided, the accepted result is saved alongside it; otherwise the file lands in the current working d |
| `session_id` | string | yes | Session ID returned by agentbrush_edit_mask_open (UUID v4). |

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_result",
    "arguments": {
      "session_id": "<session_id>"
    }
  }
}
```

## Why agentbrush_edit_mask_result is rated Medium

This tool persists data (edited images) to storage, which is a Write operation. The severity is medium rather than high because the write is of user-generated image content (not system-critical data) and the operation is reversible. The confidence is 0.85 rather than higher because the description doesn't explicitly detail file path validation or potential for path traversal, but the write intent is clear.

From the tool's own definition: "Tool downloads and saves an edited image to the file system: 'download and save the edited image' and 'the result is saved alongside it' or 'in the current working directory'. This creates or modifies files on disk."

## Use case

AI agents use agentbrush_edit_mask_result to create or update resources in Mcp Server, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Mcp Server environment.

## 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_result": {
      "limits": [
        {
          "counter": "agentbrush_edit_mask_result_rate",
          "window": "minute",
          "max": 30,
          "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_edit_mask_open` — Execute — https://policylayer.com/tools/dev-agentbrush-mcp-server/agentbrush-edit-mask-open.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_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
