Demo · sample data
Prompt-injection tool gate
A mock tool gate that allows or blocks a model tool call
rajibsai.com/demos/prompt-gate
Interactive demo · mock data. A few regex rules in your browser, not a model and not a security audit. A real gate needs a tested allow-list, not this toy.
Allow
The mock gate would let this tool call through.
- No rule fired.
{
"tool": "read_file",
"arg": "/docs/onboarding.md",
"decision": "allow"
}About this demo
Type a user message and see whether a mock “tool gate” would allow a file-read, a web fetch or an email send. It is a teaching preview of the pattern in my blog note on prompt injection for web developers, not a security product and not a guarantee that a real system is safe.
Features
- Three mock tools with allow / block rules
- Highlights instruction-like text in the prompt
- Shows a structured allow or deny decision
- All logic runs in the browser; no model is called
Tech used
TypeScriptReact
Use cases
- Explaining tool-use guardrails
- A starting point for a real allow-list
Want the production version?
Real contracts, APIs and integrations, scoped to your project.