Skip to main content
Glama

Prompt injection classifier

security_prompt_injection

Use when untrusted text - an email, a web page, another tool's output - enters a model's context and may carry instructions aimed at your agent. Returns safe/suspicious/malicious, a 0-1 score and each match with its excerpt, offset and what it would do. Also decodes base64, hex, URL-encoded and reversed payloads, and flags invisible characters. Deterministic, no model, and it says what it could not inspect. Not for ERC20 contracts (/v1/evm/token-safety). Flat price, no key. $0.005 per call, paid over x402 (USDC).

Input Schema

NameRequiredDescriptionDefault
textYesThe untrusted text to classify, up to 32 kB. Anything longer is truncated and the response says so in unknown[].
sourceNoOptional label echoed back, so a batch of calls can be matched to its items (for example "email:1842").

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does it well: it names the verdict categories, the score, the match structure (excerpt, offset, intent), the decoding passes (base64, hex, URL, reversed), invisible-character detection, determinism, the truncation honesty about what it could not inspect, and the payment/auth model (x402 USDC, flat price, no key). Not a 5 only because latency/error semantics are unstated.

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?

Front-loaded with the trigger condition, then return shape, then capabilities, then exclusion and pricing — a sensible information hierarchy. Dense but not bloated; only the pricing/payment sentence is arguably separable from invocation guidance.

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?

No output schema exists, so the description must explain returns — it does, naming the verdict, score, and match fields. It also covers capabilities, limits, and payment. Minor gap: no explicit error or rate-limit behavior.

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 coverage is 100% and both parameters (text, source) are fully documented in the schema, including the 32 kB truncation behavior. The description adds no syntax or usage detail beyond the schema, so the baseline 3 applies.

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?

Names a specific verb (classify) and resource (untrusted text entering a model context), and explicitly distinguishes itself from the sibling it could be confused with (/v1/evm/token-safety). An agent can tell exactly what this does without opening the schema.

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

Usage Guidelines5/5

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

States the triggering condition (untrusted text — email, web page, another tool's output — entering a model's context) and the exclusion (not for ERC20 contracts, use token-safety). Both when-to-use and when-not are explicit.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources