# safety-margin

`station__vigilance__safety-margin` · external (needs EXECUTION_BACKEND_URL configured) · domain `vigilance` · pv-relevance `pv-core`

Calculate safety margin distance d(s) — a weighted composite of four disproportionality metrics (PRR, ROR lower CI, IC025, EB05) and case count. d > 1.0 = clear signal; d > 0.5 = probable signal; d > 0.0 = borderline; d <= 0.0 = below threshold. Use after running PRR/ROR/IC/EBGM to synthesize a single decision metric.

> **Note:** This tool routes through an external execution backend. If `EXECUTION_BACKEND_URL` is unset on the server, calls return JSON-RPC error `-32603 "Tool execution backend not configured"`. Tools with `backend: native` execute in-process and are always callable.

## Agent metadata

- `idempotent`: unknown
- `read_only`: unknown
- `expected_latency_ms`: unknown (not yet contract-tested)
- `cost_tokens_estimate`: unknown

## Input schema

- `prr` *number* (required) — Proportional Reporting Ratio value (from compute-prr)
- `ror_lower` *number* (required) — ROR lower 95% confidence interval (from compute-ror)
- `ic025` *number* (required) — IC lower credibility interval (IC025, from compute-ic)
- `eb05` *number* (required) — EBGM 5th percentile (EB05, from compute-ebgm)
- `n` *integer* (required) — Number of case reports for this drug-event pair

## Example call

```json
POST /api/mcp
Content-Type: application/json

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "station__vigilance__safety-margin",
    "arguments": {
      "prr": 0,
      "ror_lower": 0,
      "ic025": 0,
      "eb05": 0,
      "n": 0
    }
  }
}
```

## Related

- [/tools](/tools) — all 3062 tools
- [/tools/vigilance__safety-margin](/tools/vigilance__safety-margin) — HTML page
- [/tools/vigilance__safety-margin/json](/tools/vigilance__safety-margin/json) — JSON form (agent-friendly)
- [/api/mcp](/api/mcp) — endpoint
- [/AGENTS.md](/AGENTS.md) — agent guide
