protect_file
Hides sensitive data in a local UTF-8 text file without loading its content into context, returning placeholder text and a map_id for later restoration.
Instructions
Hides private and sensitive data (names, emails, phone numbers and similar) in a local UTF-8 text file without putting the file's content in your context. Pass the file's path inside the workspace folders your client shares. The server reads the file itself and sends its text to the Opami Protect API, which keeps nothing. It returns the text with placeholders such as [PERSON_1] and a short map_id. This is pseudonymisation, and it can be reversed: the server keeps the placeholder map in its own memory for this session, and restore_text with that map_id puts the real values back. The real values stay in the server: protect_file has no return_map, so they and the map are never in the result. Text files of up to 1 MB only; PDF, DOCX and other binary files are refused. Files outside the workspace folders are refused, including through symlinks.
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": {
"path": "<path>"
},
"name": "protect_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path of a UTF-8 text file inside the client's workspace folders. Absolute, or relative when the client shares exactly one folder. | |
| exclude | No | Categories, sub-categories or types to leave as they are (for example "contact.email"). At most 50. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| usage | Yes | ||
| map_id | Yes | ||
| request_id | Yes | ||
| placeholder_text | Yes | ||
| placeholder_count | Yes |