Skip to main content
Glama

prompt_injection_check

Check untrusted text (a web page, email, document or tool output) for prompt injection before an agent reads it: instruction overrides, role and chat-template spoofing, data exfiltration links, wallet-drain and key requests, commands, and hidden text (zero-width, Unicode tag smuggling, bidi, HTML comments). Rules plus an LLM judge; returns safe/suspicious/malicious, a 0-100 score, findings with evidence and the text with hidden characters removed. Costs $0.005 USDC on Base via x402.

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": "prompt_injection_check"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesThe untrusted text to check, up to 50,000 characters
modelNoAlso ask the LLM judge (default true); false for rules only

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/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 meets it: it discloses the detection mechanism (rules plus an LLM judge), the output taxonomy (safe/suspicious/malicious with a 0-100 score and evidence-bearing findings), the sanitization side effect (hidden characters removed), and the paid x402 requirement of $0.005 USDC on Base.

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?

Two sentences, front-loaded with the verb and purpose, then mechanism/output/cost. The threat enumeration is long but every item is substantive signal rather than filler; slight density is the only cost.

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?

There is no output schema, and the description compensates by describing the verdict, score, findings and sanitized text. It omits latency, failure modes, and what happens on inputs exceeding the character limit, which keeps it short of complete for a paid classification call.

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%, so both parameters are already documented, including the 50,000-character cap and the model toggle semantics. The description reinforces the rules-vs-judge distinction but adds no format or constraint 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?

States a specific verb and resource ('Check untrusted text') plus the exact input classes (web page, email, document, tool output) and enumerates the threat categories it detects. An agent can distinguish this from siblings like email_auth_check or package_check purely from the description.

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

Usage Guidelines4/5

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

Gives a clear usage trigger: run it 'before an agent reads' untrusted content. It does not name alternatives or state when-not-to-use, but the temporal placement in a sanitization pipeline is unambiguous and the untrusted-source framing excludes trusted-text calls.

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