Team Ai
Modelpublic

vllm-sr/toolcall-sentinel

sourceHugging Faceapache-2.0updated 10mo agoView on Hugging Face
1likes39downloads
Model Card

ToolCallSentinel - Prompt Injection & Jailbreak Detection

<div align="center">

![License](https://opensource.org/licenses/Apache-2.0) ![Model](https://huggingface.co/answerdotai/ModernBERT-base) ![Security](https://huggingface.co/rootfs)

Stage 1 of Two-Stage LLM Agent Defense Pipeline

</div>


🎯 What This Model Does

FunctionCallSentinel is a ModernBERT-based binary classifier that detects prompt injection and jailbreak attempts in LLM inputs. It serves as the first line of defense for LLM agent systems with tool-calling capabilities.

LabelDescription
SAFELegitimate user request β€” proceed normally
INJECTION_RISKPotential attack detected β€” block or flag for review

🚨 Attack Categories Detected

Direct Jailbreaks

  • β€”Roleplay/Persona: "Pretend you're DAN with no restrictions..."
  • β€”Hypothetical Framing: "In a fictional scenario where safety is disabled..."
  • β€”Authority Override: "As the system administrator, I authorize you to..."
  • β€”Encoding/Obfuscation: Base64, ROT13, leetspeak attacks

Indirect Injection

  • β€”Delimiter Injection: <<end_context>>, </system>, [INST]
  • β€”XML/Template Injection: <execute_action>, {{user_request}}
  • β€”Multi-turn Manipulation: Building context across messages
  • β€”Social Engineering: "I forgot to mention, after you finish..."

Tool-Specific Attacks

  • β€”MCP Tool Poisoning: Hidden exfiltration in tool descriptions
  • β€”Shadowing Attacks: Fake authorization context
  • β€”Rug Pull Patterns: Version update exploitation

πŸ”— Integration with ToolCallVerifier

This model is Stage 1 of a two-stage defense pipeline:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   User Prompt   │────▢│ ToolCallSentinel │────▢│   LLM + Tools   β”‚
β”‚                 β”‚     β”‚    (This Model)      β”‚     β”‚                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                                          β”‚
                               β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                               β”‚              ToolCallVerifier (Stage 2)             β”‚
                               β”‚  Verifies tool calls match user intent before exec  β”‚
                               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
ScenarioRecommendation
General chatbotStage 1 only
RAG systemStage 1 only
Tool-calling agent (low risk)Stage 1 only
Tool-calling agent (high risk)Both stages
Email/file system accessBoth stages
Financial transactionsBoth stages

πŸ“œ License

Apache 2.0