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.003 per call, paid over x402 (USDC).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "text": "<text>"
    },
    "name": "security_prompt_injection"
  }
}

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.6/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so: it discloses the verdict vocabulary, scoring range, per-match detail, decoding of base64/hex/URL/reversed payloads, invisible-character flagging, determinism ('no model'), and self-reported blind spots ('says what it could not inspect'). It also covers auth and cost ('flat price, no key', '$0.003 per call, paid over x402 (USDC)'), which is exactly the operational context an agent needs before calling a paid endpoint.

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 behavior, then exclusions and pricing - a logical order with no filler sentences. The middle sentences are densely packed with multiple traits each, which slightly reduces scannability but every clause carries information.

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

Completeness5/5

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

No output schema exists, and the description compensates by describing the return payload (verdict, score, match excerpts/offsets) and the failure/coverage signal (unknown[] via schema, 'says what it could not inspect'). For a two-parameter, no-annotation tool, nothing material is missing.

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%, and both parameters (text, source) are fully documented in the schema itself, including the 32 kB truncation behavior. The description adds no parameter-level meaning beyond that, 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?

States a specific action and resource ('classify untrusted text for prompt injection') and enumerates the output shape (safe/suspicious/malicious, 0-1 score, matches with excerpt/offset). It also explicitly excludes a confusing sibling ('Not for ERC20 contracts (/v1/evm/token-safety)'), so an agent can discriminate it from evm_token_safety without opening either 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?

Gives an explicit trigger condition with concrete examples ('when untrusted text - an email, a web page, another tool's output - enters a model's context'), plus a named exclusion routing to the correct alternative. Both when-to-use and when-not-to-use are present.

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