Scan Streaming Text Chunks
rai_stream_scanScan LLM streaming text chunks for PII and harmful content without a live stream. Get per-chunk results and an aggregated summary with a stop recommendation.
Instructions
Scan a list of text chunks (as would arrive from an LLM streaming response) for PII and harmful content. Simulates the StreamingScanner guardrail without a live stream. Returns per-chunk scan results and an aggregated summary with stop recommendation.
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": {
"chunks": "<chunks>"
},
"name": "rai_stream_scan"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chunks | Yes | Ordered list of text chunks from LLM output stream | |
| hard_stop | No | Stop processing after first PII detection | |
| scan_window | No | Scan every N chunks |