Obscate PII redaction

v0.2.1
com.obscate/mcp Checked 2 days ago Published 5 days ago

Reversible PII redaction for agents: redact text/JSON before tool calls, restore replies.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

redact

Redact PII in a text before it is sent anywhere else. strategy: `fpe` (default; format-preserving, restorable without a map; names/places become bracketed `[PERSON:...]` tokens), `tokenize` (`[EMAIL_1]`, needs the returned token_map to restore), `synthetic` (realistic fakes, needs token_map), or one-way `mask`/`hash`/`partial`. labels: optional filter such as ["EMAIL","PHONE"]; see list_entities. Costs 1 API unit per 100 KB.

ParameterTypeDescription
text *string
labels
min_confidencenumber
strategystring

restore

Put the original values back into text redacted by `redact`. Pass the same `strategy` (and `labels`/`min_confidence`) used to redact, and the `key_version` that `redact` returned (fpe tokens only restore under the key version that made them). tokenize/synthetic also need the `token_map` returned by `redact`. For fpe, also pass the `restore_context` that `redact` returned: then only tokens Obscate issued are decrypted, and a number the model wrote itself (an email, phone or ID it invented) is left alone. Without it, restore is key…

ParameterTypeDescription
text *string
key_version
labels
min_confidencenumber
restore_context
strategystring
token_map

detect

Classify what PII a text contains without changing it. Returns entity labels, character offsets and confidence, plus counts by label. The matched values are left out unless include_values=true (offsets let you find them in your own copy). Costs 1 API unit per 100 KB.

ParameterTypeDescription
text *string
include_valuesboolean
labels
min_confidencenumber

redact_json

Redact PII inside a JSON object/array (e.g. a tool-call payload). Keys, nesting and non-sensitive values are unchanged so the receiving schema still works. hints: built-in field-name hints (name, email, phone, address, aadhaar, pan) on by default. field_map: per-path overrides, e.g. {"product.name": null, "sku": "IGNORE", "$.rows[*].label": "PERSON"}. keys: "report" (default, count PII in keys), "strict" (refuse if keys contain PII), "redact" (redact keys too). Keep `type_changes`, `keys_redacted`, `key_version`, and `restore_con…

ParameterTypeDescription
json *
field_map
hintsboolean
keysstring
labels
min_confidencenumber
strategystring

restore_json

Restore a JSON value (any shape, e.g. a model's reply) redacted by `redact_json`. Pass back the same strategy, field_map and hints, plus `type_changes`, `keys_redacted`, `key_version`, and `restore_context` (fpe) or `token_map` (tokenize/synthetic) from the redact_json result. With `restore_context`, numbers the model wrote itself are left alone. Free (no API units).

ParameterTypeDescription
json *
field_map
hintsboolean
key_version
keys_redactedboolean
labels
min_confidencenumber
restore_context
strategystring
token_map
type_changes

list_entities

List the entity labels and strategies the Obscate API supports. Free, no key needed.