tinplate_prompt_guard
Prompt Injection Detection API: Catch prompt injections, role hijacks, and encoded jailbreaks in user inputs and RAG chunks. (Endpoint: POST /v1/prompt-guard)
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": "tinplate_prompt_guard"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | User prompt, retrieved RAG document chunk, tool output, or LLM output to inspect (max 256 KB). | |
| context | No | Context hint (defaults to 'user_input'). 'tool_output' and 'rag_document' boost indirect injection risk (+15); 'llm_output' boosts exfiltration/leakage signals (+20). | |
| sensitivity | No | Preset threshold profile: 'low' (block >= 85, review >= 45), 'medium' (default, block >= 70, review >= 30), or 'high' (block >= 50, review >= 20). Overridden if block_threshold is explicitly set. | |
| use_ai_judge | No | Enable optional Cloudflare Workers AI second-pass semantic judge (default false). Adds ~150-400 ms inference latency when true. | |
| block_threshold | No | Explicit risk score threshold at or above which verdict is 'block' (overrides sensitivity preset). |