Scan text for hidden or deceptive Unicode
scan_textFind invisible characters, bidi controls (Trojan Source), hidden Unicode tag payloads (decoded), variation-selector runs, control characters, unusual spaces, mixed-script words and lookalike letters. ZWJ/ZWNJ/VS16 in legitimate context (emoji sequences, Persian/Arabic joining, Indic virama) are reported as info joiner_in_context and do not raise risk; elsewhere they stay medium. Lone surrogates are flagged. Returns a risk level (none/low/medium/high), counts, and findings with UTF-16 offsets and code points. Read-only. Same engine as GET /api/scan.
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": "scan_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Text to inspect (up to 2000 UTF-16 code units). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| risk | Yes | ||
| notes | No | ||
| total | Yes | ||
| counts | Yes | ||
| length | No | ||
| version | Yes | ||
| findings | Yes | ||
| truncated | No | ||
| codePoints | No | ||
| tagPayload | No | ||
| normalizedNfkcDiffers | No |