# browser_set_storage_state

A write tool on the Playwright MCP server.

Agent View of the PolicyLayer registry record for `browser_set_storage_state`. HTML page: https://policylayer.com/tools/ohos-npm-ports-playwright-mcp/browser-set-storage-state

## Facts

- Tool: `browser_set_storage_state`
- Server: Playwright (`@ohos-npm-ports/playwright-mcp`) — https://policylayer.com/tools/ohos-npm-ports-playwright-mcp.md
- Install: `npx -y @ohos-npm-ports/playwright-mcp`
- Homepage: https://www.npmjs.com/package/@ohos-npm-ports/playwright-mcp
- Risk category: Write (Medium risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Rate-limited

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

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "browser_set_storage_state",
    "arguments": {}
  }
}
```

## Why browser_set_storage_state is rated Medium

This tool modifies browser storage state, which is reversible and affects client-side data. It poses a medium severity risk because an AI agent could maliciously set storage values to manipulate application behavior, inject malicious data, or hijack sessions—but the effects are confined to browser storage and potentially reversible.

From the tool's own definition: "Tool name 'browser_set_storage_state' indicates modification of browser storage state (localStorage, sessionStorage, or similar). The 'set' verb combined with 'storage_state' strongly suggests creating or modifying stored data."

## Use case

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

## Recommended policy (PolicyLayer)

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

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "browser_set_storage_state": {
      "limits": [
        {
          "counter": "browser_set_storage_state_rate",
          "window": "minute",
          "max": 30,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on Playwright (68)

- `browser_cookie_clear` — Destructive — https://policylayer.com/tools/ohos-npm-ports-playwright-mcp/browser-cookie-clear.md
- `browser_cookie_delete` — Destructive — https://policylayer.com/tools/ohos-npm-ports-playwright-mcp/browser-cookie-delete.md
- `browser_localstorage_clear` — Destructive — https://policylayer.com/tools/ohos-npm-ports-playwright-mcp/browser-localstorage-clear.md
- `browser_localstorage_delete` — Destructive — https://policylayer.com/tools/ohos-npm-ports-playwright-mcp/browser-localstorage-delete.md
- `browser_sessionstorage_clear` — Destructive — https://policylayer.com/tools/ohos-npm-ports-playwright-mcp/browser-sessionstorage-clear.md
- `browser_sessionstorage_delete` — Destructive — https://policylayer.com/tools/ohos-npm-ports-playwright-mcp/browser-sessionstorage-delete.md
- `browser_click` — Execute — https://policylayer.com/tools/ohos-npm-ports-playwright-mcp/browser-click.md
- `browser_close` — Execute — https://policylayer.com/tools/ohos-npm-ports-playwright-mcp/browser-close.md
- `browser_drag` — Execute — https://policylayer.com/tools/ohos-npm-ports-playwright-mcp/browser-drag.md
- `browser_drop` — Execute — https://policylayer.com/tools/ohos-npm-ports-playwright-mcp/browser-drop.md
- `browser_emulate_media` — Execute — https://policylayer.com/tools/ohos-npm-ports-playwright-mcp/browser-emulate-media.md
- `browser_evaluate` — Execute — https://policylayer.com/tools/ohos-npm-ports-playwright-mcp/browser-evaluate.md
- `browser_file_upload` — Execute — https://policylayer.com/tools/ohos-npm-ports-playwright-mcp/browser-file-upload.md
- `browser_fill_form` — Execute — https://policylayer.com/tools/ohos-npm-ports-playwright-mcp/browser-fill-form.md
- `browser_generate_locator` — Execute — https://policylayer.com/tools/ohos-npm-ports-playwright-mcp/browser-generate-locator.md
- `browser_handle_dialog` — Execute — https://policylayer.com/tools/ohos-npm-ports-playwright-mcp/browser-handle-dialog.md
- `browser_hide_highlight` — Execute — https://policylayer.com/tools/ohos-npm-ports-playwright-mcp/browser-hide-highlight.md
- `browser_highlight` — Execute — https://policylayer.com/tools/ohos-npm-ports-playwright-mcp/browser-highlight.md
- `browser_hover` — Execute — https://policylayer.com/tools/ohos-npm-ports-playwright-mcp/browser-hover.md
- `browser_mouse_click_xy` — Execute — https://policylayer.com/tools/ohos-npm-ports-playwright-mcp/browser-mouse-click-xy.md
- `browser_mouse_down` — Execute — https://policylayer.com/tools/ohos-npm-ports-playwright-mcp/browser-mouse-down.md
- `browser_mouse_drag_xy` — Execute — https://policylayer.com/tools/ohos-npm-ports-playwright-mcp/browser-mouse-drag-xy.md
- `browser_mouse_move_xy` — Execute — https://policylayer.com/tools/ohos-npm-ports-playwright-mcp/browser-mouse-move-xy.md
- `browser_mouse_up` — Execute — https://policylayer.com/tools/ohos-npm-ports-playwright-mcp/browser-mouse-up.md
- `browser_mouse_wheel` — Execute — https://policylayer.com/tools/ohos-npm-ports-playwright-mcp/browser-mouse-wheel.md
- `browser_navigate` — Execute — https://policylayer.com/tools/ohos-npm-ports-playwright-mcp/browser-navigate.md
- `browser_navigate_back` — Execute — https://policylayer.com/tools/ohos-npm-ports-playwright-mcp/browser-navigate-back.md
- `browser_network_request` — Execute — https://policylayer.com/tools/ohos-npm-ports-playwright-mcp/browser-network-request.md
- `browser_network_state_set` — Execute — https://policylayer.com/tools/ohos-npm-ports-playwright-mcp/browser-network-state-set.md
- `browser_press_key` — Execute — https://policylayer.com/tools/ohos-npm-ports-playwright-mcp/browser-press-key.md
- …and 38 more: https://policylayer.com/tools/ohos-npm-ports-playwright-mcp.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=ohos-npm-ports-playwright-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/ohos-npm-ports-playwright-mcp
