redact_text
Redact sensitive data from text locally using configurable policies. Returns sanitized output for safe downstream use.
Instructions
Direct/lower-level redaction entry point; prefer prepare_for_external_ai for normal outbound workflows.
In its normal modes this performs the same local sanitization as prepare_for_external_ai and returns the approved result, so most agents should call prepare_for_external_ai instead. Use redact_text when you specifically need this lower-level compatibility path, or the 'legacy' mode for local review of raw redaction internals. The 'legacy' mode returns potentially sensitive local-review details and is never selected by default.
Returns, for normal modes, the same approved result as prepare_for_external_ai (status, sanitized_text, counts). For 'legacy' mode it returns a result with deprecation_code 'legacy_sensitive_response' containing local-review redaction data.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Free text to redact locally. Processing is on this machine; nothing is transmitted externally. | |
| policy | No | Named redaction policy controlling which entity types are masked or blocked. Defaults to 'default'. Common values include 'default' and 'strict_external_ai'; other policies may be registered. An unknown name returns a policy_not_found error. | default |
| response_mode | No | Normal modes behave like prepare_for_external_ai: 'minimal', 'review', and 'debug' return the approved result with increasing detail. The special value 'legacy' returns raw local-review redaction internals (including a mapping that reveals original values) under deprecation_code 'legacy_sensitive_response'; it must never be sent to an external service. Defaults to 'minimal'. | minimal |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||