Skip to main content
Glama

Agent Shield (MCP tool-poisoning and x402 payment scanner)

Scan any text, email, web page HTML or document for prompt injection before your agent reads it

scan_text_for_injection

Detects hidden or suspicious instructions aimed at AI agents in text or HTML: hidden HTML, invisible Unicode (tag-character smuggling), encoded payloads, fake system messages, data-exfiltration, payment-redirect and command-execution orders. Returns risk score, findings and a cleaned version that is safer to pass to an LLM. deep=true adds an AI review. Price 0.002 USDC per call; first 3 calls per day free.

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

Input Schema

NameRequiredDescriptionDefault
deepNoAlso run an AI review
modeNostrip (default) removes risky lines; flag keeps them
textYesText or HTML to scan (max 200,000 chars)
paymentNoOptional x402 payment (base64 X-PAYMENT header value). Not needed while the free daily sample lasts.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/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 disclosure burden and does well: it states the return payload (risk score, findings, cleaned text), explains the mode trade-off (strip removes risky lines, while flag keeps them), and discloses cost and quota (0.002 USDC per call, first 3 calls per day free) plus the existence of an optional x402 payment. It does not say whether the scanned text is retained or logged, and it gives no latency or rate-limit information, which are the remaining gaps for a security-scanning tool.

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?

The description is dense and front-loaded: what is detected, then what is returned, then cost and quota. The threat enumeration is long, but each item adds discriminating information for a security tool. It is one paragraph with no wasted filler, though the pricing sentence might have been separated for scannability.

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, so the description correctly explains the return shape: a risk score, findings, and a cleaned version that is safer to pass to an LLM. Combined with cost, quota, and the deep-review escalation path, that is nearly everything an agent needs to call the tool correctly; only data-retention and latency remain unspecified.

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 all four parameters are already documented, and that sets the baseline at 3. The description's 'deep=true adds an AI review' essentially restates the schema's 'Also run an AI review,' and the mode and payment semantics are covered by the schema, so the description adds little meaning beyond it.

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?

The description names a specific verb and resource (detect hidden or suspicious instructions in text or HTML) and enumerates the exact threat classes it targets: hidden HTML, invisible Unicode tag smuggling, encoded payloads, fake system messages, exfiltration, and payment-redirect and command-execution orders. Its input scope of arbitrary text, email, web page HTML, or document is clearly distinct from the siblings that scan MCP servers or tool definitions, so an agent can route to it without ambiguity.

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?

The timing is clear: 'before your agent reads it' is an explicit precondition, and the title reinforces scanning text before the agent processes it. It also hints at an escalation path: set deep=true to add an AI review. However, it never states when not to use this tool, nor does it point to the sibling scanners for MCP servers or tool definitions.

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