Skip to main content
Glama
glincker

glin-profanity-mcp

by glincker

check_prompt_injection

Scan text for prompt injection attacks using rule-based pattern matching, and return a risk score, decision (ALLOW/HITL/BLOCK), and matched categories.

Instructions

Scan text for prompt injection attacks using rule-based pattern matching. Returns a risk score (0-1), a decision (ALLOW / HITL / BLOCK), matched categories, and per-match position details. Custom patterns: max 20 patterns, each regex max 200 chars, 50 ms execution budget per pattern.

Input Schema

NameRequiredDescriptionDefault
textYesThe text to scan for prompt injection signals
hitlAtNoScore threshold at or above which the decision is HITL (human-in-the-loop) (0–1, default 0.5)
blockAtNoScore threshold at or above which the decision is BLOCK (0–1, default 0.8)
strictnessNoDetection aggressiveness. lenient = fewer false positives, strict = amplified scoring. Default: moderatemoderate
customPatternsNoAdditional custom patterns (max 20, each regex <= 200 chars, 50 ms budget per pattern)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.2

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the burden well: it discloses the decision model (ALLOW/HITL/BLOCK), risk-score range, matched categories, per-match positions, and operational limits (20 patterns, 200 chars, 50 ms budget). It does not state that the operation is read-only or describe overall latency, but the return contract and constraints are unusually explicit.

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?

Three dense sentences, front-loaded with the core operation and followed by return values and constraints. No filler or repetition.

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?

For a 5-param, single-required-parameter tool with no output schema, the description supplies return shape and key limits, which is the essential missing context. It stops short of sibling routing guidance, but the definition is otherwise self-sufficient for correct invocation.

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

Parameters3/5

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

Schema description coverage is 100%, so all five parameters (text, hitlAt, blockAt, strictness, customPatterns) are already documented in the schema. The description only restates the custom-pattern limits, adding no new semantics beyond the schema baseline.

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?

States a specific verb+resource: 'Scan text for prompt injection attacks using rule-based pattern matching.' This clearly separates it from profanity/secrets/PII scanners, but it does not explicitly name a sibling or distinguish itself from validate_content or detect_obfuscation.

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?

Usage is implied by the purpose (use when you need to detect prompt injection), but there is no explicit when-to-use, when-not-to-use, or alternative-tool guidance despite many related sibling scanners.

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