Skip to main content
Glama
LuciferForge

agent-safety-mcp

by LuciferForge

injection_scan

Scan text for prompt injection patterns to detect security risks. Returns risk assessment without blocking content.

Instructions

Scan text for prompt injection patterns. Returns risk assessment without blocking.

Args: text: The text to scan for injection attempts. threshold: Sensitivity level — "LOW", "MEDIUM", "HIGH", or "CRITICAL".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
thresholdNoMEDIUM

Implementation Reference

  • The injection_scan tool handler which uses PromptScanner to evaluate text for prompt injection patterns.
    @mcp.tool()
    def injection_scan(text: str, threshold: str = "MEDIUM") -> dict:
        """Scan text for prompt injection patterns. Returns risk assessment without blocking.
    
        Args:
            text: The text to scan for injection attempts.
            threshold: Sensitivity level — "LOW", "MEDIUM", "HIGH", or "CRITICAL".
        """
        scanner = PromptScanner(threshold=threshold)
        result = scanner.scan(text)
        return {
            "severity": result.severity,
            "risk_score": result.risk_score,
            "is_safe": result.is_safe,
            "matches": result.matches,
            "text_preview": result.text[:200],
        }
Behavior3/5

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

With no annotations provided, the description carries the full burden. It successfully indicates the tool is non-blocking and returns a risk assessment, but omits details about the return structure, error behaviors, or side effects that would be necessary for a mutation-sensitive operation.

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

Conciseness5/5

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

The description is efficiently structured with a clear purpose statement followed by an Args section. Every sentence earns its place; there is no redundant or wasted text.

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

Completeness4/5

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

Given the tool's low complexity (2 simple parameters, no nested objects) and lack of output schema, the description provides adequate coverage by explaining the inputs and general return type. It appropriately meets the minimum requirements for this simple tool, though more detail on the assessment format would strengthen it.

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

Parameters4/5

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

Despite 0% schema description coverage, the Args section effectively documents both parameters: it explains 'text' as 'The text to scan for injection attempts' and clarifies 'threshold' accepts specific enum values ('LOW', 'MEDIUM', 'HIGH', 'CRITICAL'), fully compensating for the schema's lack of descriptions.

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

Purpose4/5

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

The description clearly states the tool 'Scan[s] text for prompt injection patterns' with a specific verb and resource. However, it does not explicitly differentiate from siblings like 'injection_check' or 'injection_patterns', though 'Returns risk assessment' hints at its analytical nature.

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 phrase 'without blocking' implies this is for assessment rather than enforcement, providing implicit usage context. However, it lacks explicit when-to-use guidance or named alternatives compared to sibling tools like 'injection_check'.

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/LuciferForge/agent-safety-mcp'

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