injectshield
v0.1.4Prompt-injection firewall for AI agents — scan untrusted text before LLM calls.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
scan
Scan text for prompt-injection. Use BEFORE passing any untrusted text (web pages, file contents, user inputs, git commits, tool outputs) into another LLM call. Returns a verdict (safe/unsafe), a confidence score, the threat category, the matched pattern IDs, and an optional sanitized version with injection spans redacted.
| Parameter | Type | Description |
|---|---|---|
text * | string | Text to scan (max 100,000 chars). |
context | string | Where the text came from. Affects scoring — git commits are treated as more suspicious than user input by default. |
return_cleaned | boolean | Return the input with detected spans redacted. |
sensitivity | string | Detection threshold. low = fewest false positives, high = fewest false negatives. Default: medium. |
scan_url
Fetch a URL and scan its body for prompt-injection. Useful before feeding scraped page content into another LLM call. Sets the context to web_content automatically.
| Parameter | Type | Description |
|---|---|---|
url * | string | URL to fetch and scan. |
context | string | Override the default web_content context. |
max_bytes | integer | Truncate fetched body before scanning. Default 50000. |
return_cleaned | boolean | |
sensitivity | string |
patterns
List supported threat categories, context kinds, and sensitivity levels. Use this to discover what threat_type values scan() can return.