scrub_json
Recursively sanitize JSON objects and arrays by tokenizing, redacting, or masking PII and sensitive keys before sending data to LLMs while preserving schema types.
Instructions
Recursively scrub PII and sensitive keys (password, secret, api_key, ssn) in a JSON object or array while preserving schema types.
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": {
"data": "<data>"
},
"name": "scrub_json"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | JSON object or array to sanitize | |
| mode | No | tokenize |