Redact Text
redact_textUse this when scrubbing test/dev text: replaces each occurrence of the given terms with block characters (████). Provide text plus terms (a comma-separated string or an array of strings). By default it matches whole words only using Unicode boundaries (so "ann" will not match inside "annual") and is case-insensitive; set caseSensitive to match exactly, wholeWords: false to match substrings, or fixedWidth: true to hide each term's length behind a constant-width bar. Returns the redacted text and a replacement count, and never echoes the original terms. Deterministic: same input, same output. Truly sensitive text is better redacted client-side at clean.tools/text-redact/. Example: {text: "Contact Jane Doe", terms: "Jane Doe"} -> redacted "Contact ████████", redactedCount 1.
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>",
"terms": "<terms>"
},
"name": "redact_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The text to redact terms from. | |
| terms | Yes | The sensitive terms to redact, given either as a comma-separated string (e.g. "Jane Doe, jane@x.com") or an array of strings. | |
| fixedWidth | No | When true, replace every matched term with a constant-width block bar so the redacted length does not leak the original term length. Defaults to false (block length equals term length). | |
| wholeWords | No | When true (default), only match terms as whole words using Unicode word boundaries (so "ann" will not match inside "annual"). | |
| caseSensitive | No | When true, match terms case-sensitively. Defaults to false (case-insensitive). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| redacted | Yes | The text with all matched terms replaced by block characters; identical to the input when no terms matched. | |
| redactedCount | Yes | The number of replacements made. |