airlock_dehydrate
Replace secrets and contextual PII in raw text with reversible <ENTITY_N> placeholders, saving each detected value in a local vault for later rehydration.
Instructions
Convert raw text containing secrets and contextual PII into reversible <ENTITY_N> placeholders.
Purpose & Behavior:
Runs both deterministic pattern matching (API keys, JWTs, URI passwords, cards, SSNs, emails, IPs) and
contextual ONNX GLiNER entity recognition (person names, organizations, locations) on `text`. Every
detected span is stored in the local session vault and replaced with a deterministic placeholder such as
`<PERSON_1>` or `<API_KEY_1>`.
When to Use:
- Use `airlock_dehydrate` when you need full-coverage PII plus secret redaction on raw text and plan to
restore original values later via `airlock_rehydrate`.
- Choose `airlock_scrub_text(text, use_ner=False)` instead for sub-millisecond credential/regex scrubbing
of code or logs without loading the neural NER model.
- Choose `airlock_read_file` instead when reading directly from a local file path.
Returns:
A JSON-serializable object with `{"sanitized_text": str, "redacted_count": int, "latency_ms": float,
"tokens": list[str]}`.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"text": "<text>"
},
"name": "airlock_dehydrate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Raw input text containing credentials, connection strings, or natural-language PII (names, emails, phones, IPs, SSNs, credit cards) to convert into <ENTITY_N> vault placeholders. |