Scan content for prompt injection
stack_scanScan text or a JSON object (an email, document, web page, API response or similar) for prompt-injection markers. Detection uses a regex pattern catalog plus encoding-aware normalization (base64, URL, hex, leetspeak, unicode homoglyphs, zero-width characters, ROT13, reversed text), plus an optional classifier layer that can also run. STACK keeps the verdict and snippets, never the scanned content: a suspicious or critical verdict records a security event with the matched excerpt (up to 80 characters), a short reasoning note and the source label, and every scan writes an audit row that holds at most the matched pattern id and field path, never the scanned text. Returns verdict ("clean", "suspicious" or "critical"), match details, scan_id and duration_ms. Each scan is metered.
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": {
"content": "<content>"
},
"name": "stack_scan"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | No | Optional source identifier (URL / sender / filename). Truncated to 256 chars in security event metadata. | |
| content | Yes | The content to scan. Strings scanned directly; objects walked one level deep. | |
| context | No | Optional context tag, recorded in security event metadata for filtering by retrieval source. | |
| passport_token | No | Optional passport JWT for attribution to a specific agent context. |