# detach

Detach from the current session and unload any injected scripts.

Agent View of the PolicyLayer registry record for `detach`. HTML page: https://policylayer.com/tools/1193776794-frida-mcp/detach

## Facts

- Tool: `detach`
- Server: Frida Agent MCP (`1193776794/frida-mcp`) — https://policylayer.com/tools/1193776794-frida-mcp.md
- Homepage: https://github.com/1193776794/frida-mcp
- Risk category: Execute (High risk)
- Registry record: grade D, 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": "detach",
    "arguments": {}
  }
}
```

## Why detach is rated High

This tool terminates an active Frida instrumentation session and unloads injected scripts. It triggers an external operation (detaching from a process and unloading code) that has side effects on the target process's instrumentation state.

From the tool's own definition: "Detach from the current session and unload any injected scripts"

## Use case

AI agents invoke detach to trigger actions in Frida Agent 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 Frida Agent MCP:

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

## Other tools on Frida Agent MCP (9)

- `kill_app` — Destructive — https://policylayer.com/tools/1193776794-frida-mcp/kill-app.md
- `connect` — Execute — https://policylayer.com/tools/1193776794-frida-mcp/connect.md
- `execute` — Execute — https://policylayer.com/tools/1193776794-frida-mcp/execute.md
- `launch_app` — Execute — https://policylayer.com/tools/1193776794-frida-mcp/launch-app.md
- `reconnect` — Execute — https://policylayer.com/tools/1193776794-frida-mcp/reconnect.md
- `spawn_and_inject` — Execute — https://policylayer.com/tools/1193776794-frida-mcp/spawn-and-inject.md
- `get_messages` — Read — https://policylayer.com/tools/1193776794-frida-mcp/get-messages.md
- `list_apps` — Read — https://policylayer.com/tools/1193776794-frida-mcp/list-apps.md
- `logcat` — Read — https://policylayer.com/tools/1193776794-frida-mcp/logcat.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=1193776794-frida-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/1193776794-frida-mcp
