# trace_function

Traces calls to a function by its name in the source code. Works for ANY function including module-internal functions (webpack/rollup bundled). Uses

Agent View of the PolicyLayer registry record for `trace_function`. HTML page: https://policylayer.com/tools/1600822305-js-reverse-mcp/trace-function

## Facts

- Tool: `trace_function`
- 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": "trace_function",
    "arguments": {}
  }
}
```

## Why trace_function is rated High

This tool actively instruments browser execution by hooking/tracing function calls at runtime. It injects tracing logic into the running browser context to intercept function invocations, which constitutes executing operations in an external system (the browser).

From the tool's own definition: "Traces calls to a function by its name in the source code... Uses [Chrome DevTools Protocol to instrument browser execution]"

## Use case

AI agents invoke trace_function 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": {
    "trace_function": {
      "limits": [
        {
          "counter": "trace_function_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
