Scan text for prompt injection and PII
prompt_injection_scanScans untrusted text for prompt-injection phrasing, exfiltration patterns, hidden characters, secrets, and PII, returning character spans, a 0-1 risk score, and an optional redacted copy.
Instructions
Rule-based scan of untrusted text (retrieved documents, tool output, user input) for prompt-injection phrasing, exfiltration patterns, hidden characters, secrets, and personal information. Returns findings with character spans, a 0 to 1 risk score, and optionally a redacted copy of the text.
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": "prompt_injection_scan"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Text to scan | |
| redact | No | Return redactedText with PII and secrets replaced | |
| categories | No | Categories to check (default: all) | |
| maxFindings | No | Maximum findings (default 200) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notes | Yes | ||
| findings | Yes | ||
| riskLevel | Yes | ||
| riskScore | Yes | ||
| findingCount | Yes | ||
| redactedText | No | ||
| categoryScores | Yes |