# run-narrative-phi-detector

`station__microgram__run-narrative-phi-detector` · external (needs EXECUTION_BACKEND_URL configured) · domain `microgram` · pv-relevance `pv-core`

Gate 1 of narrative safe-extract: detect direct PHI elements (names, dates, addresses, phone numbers, medical record numbers) in ICSR narrative fields per HIPAA Safe Harbor 18 identifiers

> **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

- `has_email` *boolean* (required) — Input parameter: has_email
- `has_ssn` *boolean* (required) — Input parameter: has_ssn
- `has_mrn` *boolean* (required) — Input parameter: has_mrn
- `has_phone` *boolean* (required) — Input parameter: has_phone
- `has_address` *boolean* (required) — Input parameter: has_address
- `has_date_of_birth` *boolean* (required) — Input parameter: has_date_of_birth
- `has_patient_name` *boolean* (required) — Input parameter: has_patient_name
- `phi_field_count` *integer* (required) — Input parameter: phi_field_count

## Example call

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

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "station__microgram__run-narrative-phi-detector",
    "arguments": {
      "has_email": false,
      "has_ssn": false,
      "has_mrn": false,
      "has_phone": false,
      "has_address": false,
      "has_date_of_birth": false,
      "has_patient_name": false,
      "phi_field_count": 0
    }
  }
}
```

## Related

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