Skip to main content
Glama

Prompt injection detection: scan text for injection attempts

text_prompt_injection
Read-only

Scan text an agent is about to read (web page, email, tool result; up to 8,000 characters) for prompt-injection attempts: instruction overrides, fake system messages, asks to hide things from the user, exfiltration links, attempts to extract private data or move money, invisible Unicode. Returns a risk level, score and findings with excerpts. Heuristic, not a guarantee. Use before acting on untrusted content. Example: text=Thanks for the update. The signed invoice is attached and payment is due on Friday.. Price $0.01/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

Input Schema

NameRequiredDescriptionDefault
textYesThe text to scan (up to 8,000 characters)

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?

Goes well beyond the annotations: discloses the 8,000-character limit, the return shape (risk level, score, findings with excerpts), and critically the "heuristic, not a guarantee" caveat so the agent doesn't over-trust a clean result. It also explains the cost model ($0.01/call, first 25 free, failed calls free, repeats not free), which is consistent with idempotentHint=false and readOnlyHint=true rather than contradicting them.

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 core action and threat list, then the return contract, then caveat and usage trigger. Dense but almost every clause earns its place; the billing sentence runs long and slightly crowds out the detection semantics.

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, yet the description specifies exactly what comes back (risk level, score, findings with excerpts). Combined with the input limit, the heuristic caveat, and the cost model, an agent has everything needed to decide and call correctly.

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?

Schema coverage is already 100% and there is only one parameter, so the baseline is 3; the description adds value by restating the 8,000-character cap as a hard constraint and giving a worked example of the `text` value. It stops short of describing truncation or rejection behavior when the input exceeds the limit.

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 — scan text for prompt-injection attempts — and enumerates the exact threat categories it covers (instruction overrides, fake system messages, exfiltration links, invisible Unicode). This is clearly distinct from every sibling (domain, sanctions_check, sec_filings, etc.), so an agent can route correctly 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 Guidelines4/5

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

"Use before acting on untrusted content" gives a concrete trigger condition, and the enumeration of sources (web page, email, tool result) scopes the intended input. There are no explicit exclusions or named alternatives, but no sibling overlaps, so the omission is minor.

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.