# chrome_execute_script

Execute JavaScript code in the current page

Agent View of the PolicyLayer registry record for `chrome_execute_script`. HTML page: https://policylayer.com/tools/2019-02-18-mcx/chrome-execute-script

## Facts

- Tool: `chrome_execute_script`
- Server: Chrome Feedback (`2019-02-18/mcx`) — https://policylayer.com/tools/2019-02-18-mcx.md
- Homepage: https://github.com/2019-02-18/MCX
- 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": "chrome_execute_script",
    "arguments": {}
  }
}
```

## Why chrome_execute_script is rated High

Executing JavaScript in a webpage context permits arbitrary DOM manipulation, data exfiltration, XSS-like injection, and interaction with page APIs. While not inherently destructive (no guarantee of permanent data loss) or financial, the capability to run code whose effects depend entirely on what script is supplied makes this an Execute-category risk.

From the tool's own definition: "Tool description states 'Execute JavaScript code in the current page' — this directly runs code with arbitrary effects determined by the arguments passed."

## Use case

AI agents invoke chrome_execute_script to trigger actions in Chrome Feedback. 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 Chrome Feedback:

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

## Other tools on Chrome Feedback (15)

- `chrome_clear_feedback_history` — Destructive — https://policylayer.com/tools/2019-02-18-mcx/chrome-clear-feedback-history.md
- `chrome_click_element` — Execute — https://policylayer.com/tools/2019-02-18-mcx/chrome-click-element.md
- `chrome_fill_input` — Execute — https://policylayer.com/tools/2019-02-18-mcx/chrome-fill-input.md
- `chrome_interact_element` — Execute — https://policylayer.com/tools/2019-02-18-mcx/chrome-interact-element.md
- `chrome_navigate_to_url` — Execute — https://policylayer.com/tools/2019-02-18-mcx/chrome-navigate-to-url.md
- `chrome_wait_for_element` — Execute — https://policylayer.com/tools/2019-02-18-mcx/chrome-wait-for-element.md
- `chrome_analyze_form_structure` — Read — https://policylayer.com/tools/2019-02-18-mcx/chrome-analyze-form-structure.md
- `chrome_extract_content` — Read — https://policylayer.com/tools/2019-02-18-mcx/chrome-extract-content.md
- `chrome_get_extension_status` — Read — https://policylayer.com/tools/2019-02-18-mcx/chrome-get-extension-status.md
- `chrome_get_feedback_history` — Read — https://policylayer.com/tools/2019-02-18-mcx/chrome-get-feedback-history.md
- `chrome_get_page_info` — Read — https://policylayer.com/tools/2019-02-18-mcx/chrome-get-page-info.md
- `chrome_interactive_feedback` — Read — https://policylayer.com/tools/2019-02-18-mcx/chrome-interactive-feedback.md
- `chrome_smart_locate_element` — Read — https://policylayer.com/tools/2019-02-18-mcx/chrome-smart-locate-element.md
- `chrome_take_screenshot` — Read — https://policylayer.com/tools/2019-02-18-mcx/chrome-take-screenshot.md
- `chrome_fill_form` — Write — https://policylayer.com/tools/2019-02-18-mcx/chrome-fill-form.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=2019-02-18-mcx · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/2019-02-18-mcx
