protect_text
Replaces sensitive data like names, emails, and phone numbers with placeholders and returns a map_id for later restoration, keeping real values out of the result.
Instructions
Hides private and sensitive data (names, emails, phone numbers and similar) in a text by replacing them with placeholders such as [PERSON_1]. The text is sent to the Opami Protect API, which keeps nothing. This is pseudonymisation, and it can be reversed: the server keeps the placeholder map in its own memory for this session and returns a short map_id, and restore_text with that map_id puts the real values back. The real values stay in the server and out of the result unless return_map is true. output: "replace" swaps in fake data instead; it works in 7 languages, costs twice as much and cannot be restored.
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": "protect_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The text to protect. Must not be empty. | |
| output | No | "placeholders" (default) or "replace" (fake data in 7 languages, costs 2x, cannot be restored). | |
| exclude | No | Categories, sub-categories or types to leave as they are (for example "contact.email"). At most 50. | |
| return_map | No | Also return the placeholder map with the real values. Default false. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| usage | Yes | ||
| map_id | No | ||
| output | Yes | ||
| request_id | Yes | ||
| placeholders | No | ||
| replaced_text | No | ||
| placeholder_text | No | ||
| placeholder_count | No |