sanitize_untrusted_text
Strip hidden Unicode tags, bidi overrides, zero-width steganography, and hidden HTML/CSS prompt-injection payloads from untrusted text or local files, returning cleaned text, injection signals, and a nonce-wrapped envelope.
Instructions
Strip hidden Unicode Tag ASCII blocks (U+E0000..U+E007F), Trojan-Source bidi overrides, zero-width steganography, and hidden HTML/CSS prompt-injection payloads from untrusted text or a local file (<= 2 MiB), returning cleaned text, injection signals, and a nonce-wrapped envelope.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "sanitize_untrusted_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Path to a local untrusted file (<= 2 MiB) to read and sanitize when `text` is omitted. | |
| text | No | Raw untrusted text or HTML to sanitize. Provide either `text` or `path`. | |
| strip_html | No | Strip HTML tags and decode entities after removing hidden DOM injection blocks. | |
| source_label | No | Short provenance label recorded in the XML nonce wrapper (default: 'external'). | external |