Redact PII
promptguard_redactRedact PII from text. Returns the text with each entity replaced by a labeled placeholder, e.g. [EMAIL_REDACTED], [PHONE_REDACTED], [SSN_REDACTED], the PII types found, and skipped: the matches deliberately left in the text. Never returns the original text. Each call counts as one Request on your PromptGuard plan.
Without pii_types it redacts what the Project's policy redacts; a default Project redacts emails, phone numbers, SSNs, payment cards, bank and national identifiers, IP addresses and API keys. Pass pii_types to redact only the types you name. An email at a domain reserved for documentation and testing (example.com, .test, .invalid, localhost) is never redacted, since it cannot be a person's address: it comes back in skipped with the reason reserved_domain, so test with a real-looking domain.
When to use: Before including user data in LLM prompts, when processing customer messages, or when building RAG pipelines that ingest documents containing personal information.
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": "promptguard_redact"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The text content to redact PII from | |
| pii_types | No | PII types to redact, the REST API's vocabulary: detector entity names ('email', 'ssn', 'credit_card', 'phone_us'), the family aliases 'phone', 'ip_address' and 'passport', and 'api_key'. Omit to redact what the Project's policy redacts. An unrecognized name is refused with the code 'unknown_pii_type' rather than ignored. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||