Skip to main content
Glama
CSOAI-ORG

Agent Prompt Injection Firewall MCP

scan_prompt

Scans text for prompt injection, returning a decision trace with risk level, matched patterns, and recommended action. Supports contexts like user prompts, RAG documents, tool args, and A2A payloads.

Instructions

Scan a piece of text for prompt injection. Returns full decision trace.

  • context: where this text came from (user-prompt | rag-document | tool-arg | a2a-payload) Returns safe, risk_level (none|low|medium|high|critical), patterns_matched (list of rule hits), and recommended_action (allow | log | escalate | block).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tenant_idYes
textYes
contextNouser-prompt
api_keyNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. It discloses the return structure (decision trace with fields) and the context parameter's purpose. It lacks details on side effects, authentication, or rate limits, but the scanning operation is implicitly non-destructive and the output info is thorough.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is short and front-loaded with the main action. The bullet-style list of return fields and context options is clear and efficient. However, the parameter documentation gap prevents a perfect score.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 4 parameters (2 required), an output schema, and 4 sibling tools, the description covers the tool's purpose, output, and one parameter. But it omits explanations for 'tenant_id' and 'api_key', leaving critical gaps for a complete understanding of how to invoke the tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, requiring the description to compensate. The description only explains the 'context' parameter with its allowed values. It does not cover 'tenant_id', 'text', or 'api_key', which are not self-explanatory. Thus, the description adds limited value for parameter understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool scans text for prompt injection, using a specific verb and resource. It lists the return fields (safe, risk_level, patterns_matched, recommended_action) and the context parameter options, making it easy to distinguish from siblings like scan_log or define_custom_rule.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains that the tool scans text and provides context options (user-prompt, rag-document, etc.), which implies usage scenarios. However, it does not explicitly state when not to use it or suggest alternatives among siblings, leaving the agent to infer without clear guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/CSOAI-ORG/agent-prompt-injection-firewall-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server