# watch_global

Watches a global variable for changes. When the variable is modified, logs the old and new values to console.

Agent View of the PolicyLayer registry record for `watch_global`. HTML page: https://policylayer.com/tools/1600822305-js-reverse-mcp/watch-global

## Facts

- Tool: `watch_global`
- Server: Js Reverse (`1600822305/js-reverse-mcp`) — https://policylayer.com/tools/1600822305-js-reverse-mcp.md
- Homepage: https://github.com/1600822305/js-reverse-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": "watch_global",
    "arguments": {}
  }
}
```

## Why watch_global is rated High

The tool actively executes code within the browser context (via Chrome DevTools Protocol) to set up watchers/breakpoints on global variables. This constitutes executing code in an external runtime environment, not merely reading data. Misuse could allow monitoring sensitive global variables (e.g., auth tokens, credentials) in the browser context, making it medium severity.

From the tool's own definition: "'Watches a global variable for changes' — this injects monitoring logic (likely via CDP) into the browser runtime to intercept variable modifications and log old/new values to console."

## Use case

AI agents invoke watch_global to trigger actions in Js Reverse. 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 Js Reverse:

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

## Other tools on Js Reverse (92)

- `clear_browser_cache` — Destructive — https://policylayer.com/tools/1600822305-js-reverse-mcp/clear-browser-cache.md
- `clear_cookies` — Destructive — https://policylayer.com/tools/1600822305-js-reverse-mcp/clear-cookies.md
- `clear_network_conditions` — Destructive — https://policylayer.com/tools/1600822305-js-reverse-mcp/clear-network-conditions.md
- `delete_cookie` — Destructive — https://policylayer.com/tools/1600822305-js-reverse-mcp/delete-cookie.md
- `delete_token` — Destructive — https://policylayer.com/tools/1600822305-js-reverse-mcp/delete-token.md
- `remove_breakpoint` — Destructive — https://policylayer.com/tools/1600822305-js-reverse-mcp/remove-breakpoint.md
- `remove_dom_breakpoint` — Destructive — https://policylayer.com/tools/1600822305-js-reverse-mcp/remove-dom-breakpoint.md
- `remove_network_rule` — Destructive — https://policylayer.com/tools/1600822305-js-reverse-mcp/remove-network-rule.md
- `remove_xhr_breakpoint` — Destructive — https://policylayer.com/tools/1600822305-js-reverse-mcp/remove-xhr-breakpoint.md
- `add_network_rule` — Execute — https://policylayer.com/tools/1600822305-js-reverse-mcp/add-network-rule.md
- `api_request` — Execute — https://policylayer.com/tools/1600822305-js-reverse-mcp/api-request.md
- `batch_replay` — Execute — https://policylayer.com/tools/1600822305-js-reverse-mcp/batch-replay.md
- `break_on_attribute_modified` — Execute — https://policylayer.com/tools/1600822305-js-reverse-mcp/break-on-attribute-modified.md
- `break_on_node_removed` — Execute — https://policylayer.com/tools/1600822305-js-reverse-mcp/break-on-node-removed.md
- `break_on_subtree_modified` — Execute — https://policylayer.com/tools/1600822305-js-reverse-mcp/break-on-subtree-modified.md
- `break_on_xhr` — Execute — https://policylayer.com/tools/1600822305-js-reverse-mcp/break-on-xhr.md
- `encode_protobuf` — Execute — https://policylayer.com/tools/1600822305-js-reverse-mcp/encode-protobuf.md
- `evaluate_on_callframe` — Execute — https://policylayer.com/tools/1600822305-js-reverse-mcp/evaluate-on-callframe.md
- `evaluate_script` — Execute — https://policylayer.com/tools/1600822305-js-reverse-mcp/evaluate-script.md
- `hook_crypto_functions` — Execute — https://policylayer.com/tools/1600822305-js-reverse-mcp/hook-crypto-functions.md
- `hook_function` — Execute — https://policylayer.com/tools/1600822305-js-reverse-mcp/hook-function.md
- `monitor_events` — Execute — https://policylayer.com/tools/1600822305-js-reverse-mcp/monitor-events.md
- `monitor_eventsource` — Execute — https://policylayer.com/tools/1600822305-js-reverse-mcp/monitor-eventsource.md
- `monitor_form_submit` — Execute — https://policylayer.com/tools/1600822305-js-reverse-mcp/monitor-form-submit.md
- `monitor_input_changes` — Execute — https://policylayer.com/tools/1600822305-js-reverse-mcp/monitor-input-changes.md
- `navigate_page` — Execute — https://policylayer.com/tools/1600822305-js-reverse-mcp/navigate-page.md
- `new_page` — Execute — https://policylayer.com/tools/1600822305-js-reverse-mcp/new-page.md
- `pause` — Execute — https://policylayer.com/tools/1600822305-js-reverse-mcp/pause.md
- `replay_request` — Execute — https://policylayer.com/tools/1600822305-js-reverse-mcp/replay-request.md
- `resume` — Execute — https://policylayer.com/tools/1600822305-js-reverse-mcp/resume.md
- …and 62 more: https://policylayer.com/tools/1600822305-js-reverse-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=1600822305-js-reverse-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/1600822305-js-reverse-mcp
