# set_viewport_size

A execute tool on the Playwright MCP Server MCP server.

Agent View of the PolicyLayer registry record for `set_viewport_size`. HTML page: https://policylayer.com/tools/alexrwilliam-playwright-mcp-server/set-viewport-size

## Facts

- Tool: `set_viewport_size`
- Server: Playwright MCP Server (`alexrwilliam/playwright-mcp-server`) — https://policylayer.com/tools/alexrwilliam-playwright-mcp-server.md
- Homepage: https://github.com/alexrwilliam/playwright-mcp-server
- Risk category: Execute (High 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": "set_viewport_size",
    "arguments": {}
  }
}
```

## Why set_viewport_size is rated High

Based on the tool name and server context (Playwright browser automation), this tool likely sets the viewport dimensions of a browser page. This is a browser action that modifies the state of an active browser session. No description is provided, which lowers confidence. It fits best under Execute as it triggers an external browser operation, though the blast radius is low since it only affects display dimensions.

From the tool's own definition: "Tool name 'set_viewport_size' on a Playwright browser automation server; description is empty and uninformative."

## Use case

AI agents invoke set_viewport_size to trigger actions in Playwright 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 Playwright MCP Server:

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

## Other tools on Playwright MCP Server (66)

- `clear_cookies` — Destructive — https://policylayer.com/tools/alexrwilliam-playwright-mcp-server/clear-cookies.md
- `clear_network_logs` — Destructive — https://policylayer.com/tools/alexrwilliam-playwright-mcp-server/clear-network-logs.md
- `clear_storage` — Destructive — https://policylayer.com/tools/alexrwilliam-playwright-mcp-server/clear-storage.md
- `apply_antidetect_preset` — Execute — https://policylayer.com/tools/alexrwilliam-playwright-mcp-server/apply-antidetect-preset.md
- `check_checkbox` — Execute — https://policylayer.com/tools/alexrwilliam-playwright-mcp-server/check-checkbox.md
- `clear_text` — Execute — https://policylayer.com/tools/alexrwilliam-playwright-mcp-server/clear-text.md
- `click` — Execute — https://policylayer.com/tools/alexrwilliam-playwright-mcp-server/click.md
- `evaluate` — Execute — https://policylayer.com/tools/alexrwilliam-playwright-mcp-server/evaluate.md
- `fill` — Execute — https://policylayer.com/tools/alexrwilliam-playwright-mcp-server/fill.md
- `go_back` — Execute — https://policylayer.com/tools/alexrwilliam-playwright-mcp-server/go-back.md
- `go_forward` — Execute — https://policylayer.com/tools/alexrwilliam-playwright-mcp-server/go-forward.md
- `hover` — Execute — https://policylayer.com/tools/alexrwilliam-playwright-mcp-server/hover.md
- `intercept_route` — Execute — https://policylayer.com/tools/alexrwilliam-playwright-mcp-server/intercept-route.md
- `navigate` — Execute — https://policylayer.com/tools/alexrwilliam-playwright-mcp-server/navigate.md
- `press_key` — Execute — https://policylayer.com/tools/alexrwilliam-playwright-mcp-server/press-key.md
- `recreate_context` — Execute — https://policylayer.com/tools/alexrwilliam-playwright-mcp-server/recreate-context.md
- `reload` — Execute — https://policylayer.com/tools/alexrwilliam-playwright-mcp-server/reload.md
- `restart_browser` — Execute — https://policylayer.com/tools/alexrwilliam-playwright-mcp-server/restart-browser.md
- `scroll` — Execute — https://policylayer.com/tools/alexrwilliam-playwright-mcp-server/scroll.md
- `select_option` — Execute — https://policylayer.com/tools/alexrwilliam-playwright-mcp-server/select-option.md
- `set_extra_headers` — Execute — https://policylayer.com/tools/alexrwilliam-playwright-mcp-server/set-extra-headers.md
- `set_user_agent` — Execute — https://policylayer.com/tools/alexrwilliam-playwright-mcp-server/set-user-agent.md
- `switch_page` — Execute — https://policylayer.com/tools/alexrwilliam-playwright-mcp-server/switch-page.md
- `switch_to_latest_page` — Execute — https://policylayer.com/tools/alexrwilliam-playwright-mcp-server/switch-to-latest-page.md
- `type_text` — Execute — https://policylayer.com/tools/alexrwilliam-playwright-mcp-server/type-text.md
- `uncheck_checkbox` — Execute — https://policylayer.com/tools/alexrwilliam-playwright-mcp-server/uncheck-checkbox.md
- `unroute_all` — Execute — https://policylayer.com/tools/alexrwilliam-playwright-mcp-server/unroute-all.md
- `upload_file` — Execute — https://policylayer.com/tools/alexrwilliam-playwright-mcp-server/upload-file.md
- `wait_for_element` — Execute — https://policylayer.com/tools/alexrwilliam-playwright-mcp-server/wait-for-element.md
- `wait_for_load_state` — Execute — https://policylayer.com/tools/alexrwilliam-playwright-mcp-server/wait-for-load-state.md
- …and 36 more: https://policylayer.com/tools/alexrwilliam-playwright-mcp-server.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=alexrwilliam-playwright-mcp-server · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/alexrwilliam-playwright-mcp-server
