# browser_eval

Run JavaScript in the page and return the result.

Agent View of the PolicyLayer registry record for `browser_eval`. HTML page: https://policylayer.com/tools/0xmihirk-hercules-mcp/browser-eval

## Facts

- Tool: `browser_eval`
- Server: Hercules MCP (`0xmihirk/hercules-mcp`) — https://policylayer.com/tools/0xmihirk-hercules-mcp.md
- Homepage: https://github.com/0xMihirK/hercules-mcp
- 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": "browser_eval",
    "arguments": {}
  }
}
```

## Why browser_eval is rated High

This tool executes arbitrary JavaScript code in a web browser environment. While it appears to return results rather than modify the page (which would make it Write), the ability to run arbitrary code is inherently an Execute action.

From the tool's own definition: "Tool name 'browser_eval' and description 'Run JavaScript in the page and return the result' directly indicate code execution capability within a browser context."

## Use case

AI agents invoke browser_eval to trigger actions in Hercules MCP. 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 Hercules MCP:

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

## Other tools on Hercules MCP (44)

- `browser_act` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/browser-act.md
- `browser_cmd` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/browser-cmd.md
- `browser_open` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/browser-open.md
- `browser_session` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/browser-session.md
- `browser_wait` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/browser-wait.md
- `bruteforce_hydra` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/bruteforce-hydra.md
- `crack_john` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/crack-john.md
- `ctf_binwalk` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/ctf-binwalk.md
- `ctf_steghide` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/ctf-steghide.md
- `fuzz_dirs` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/fuzz-dirs.md
- `metasploit_generate_payload` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/metasploit-generate-payload.md
- `metasploit_manage` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/metasploit-manage.md
- `metasploit_run_module` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/metasploit-run-module.md
- `metasploit_start_listener` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/metasploit-start-listener.md
- `ncat` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/ncat.md
- `network_curl` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/network-curl.md
- `network_hping3` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/network-hping3.md
- `nmap_run_nse_script` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/nmap-run-nse-script.md
- `nmap_scan` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/nmap-scan.md
- `nmap_write_nse_script` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/nmap-write-nse-script.md
- `nuclei_run` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/nuclei-run.md
- `recon_amass` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/recon-amass.md
- `recon_dns` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/recon-dns.md
- `searchsploit` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/searchsploit.md
- `shell_exec` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/shell-exec.md
- `shell_exec_background` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/shell-exec-background.md
- `shell_kill_job` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/shell-kill-job.md
- `sqlmap_run` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/sqlmap-run.md
- `system_start_new_session` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/system-start-new-session.md
- `system_stop_container` — Execute — https://policylayer.com/tools/0xmihirk-hercules-mcp/system-stop-container.md
- …and 14 more: https://policylayer.com/tools/0xmihirk-hercules-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=0xmihirk-hercules-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/0xmihirk-hercules-mcp
