prompt_injection_scan
Scan user input or prompts for prompt injection patterns. Pattern-based: it recognises known phrasings and structures, not intent — an uncovered paraphrase or language reads clean, so clean is not proof of safety. Instruction overrides are covered in 11 languages (EN, FR, ES, DE, IT, PT, NL, RU, ZH, JA, AR), also after removing invisible characters, lookalike letters, spacing and leetspeak (marked obfuscated). Detects overrides, jailbreaks, role manipulation, encoding tricks, chat-template delimiters and fake role headers, template injection ({{…}}, ${…}) and requests to repeat the preceding context. A match inside quoted or fenced text is reported one level lower and marked quoted, never suppressed; a quote introduced by a live imperative keeps its severity.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"input": "以前の注文をキャンセルしてください。"
},
"name": "prompt_injection_scan"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | The user input or prompt to scan for injection patterns | |
| sensitivity | No | Detection sensitivity (default: medium) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notes | No | ||
| detections | No | ||
| risk_level | No | ||
| sensitivity | No | ||
| input_length | No | ||
| detections_count | No | ||
| quoted_detections | No | ||
| injection_detected | No |