Skip to main content
Glama

x420_security_prompt-injection-scan

Read-onlyIdempotent

Prompt-injection scan: Heuristic scan of up to 50 kB of text (a web page, email, tool result or document an agent is about to read) for prompt-injection and data-exfiltration patterns: instruction overrides, role impersonation, zero-width and Unicode-tag hidden text, encoded instructions, markdown image beacons, credential URLs, send-to patterns and tool-call syntax. Returns a 0-100 risk score with matched rules and short snippets. A heuristic signal, not a determination. Pure code. Not professional, legal, insurance, engineering, medical, financial or tax advice. Price: $0.002 USDC per call (x402 on Base). This hosted tool does NOT pay and does NOT return the deliverable: it validates the input and returns payment instructions (pay_to, network, price and the x402 URL to pay at). GET the url; read PAYMENT-REQUIRED from the 402; retry with PAYMENT-SIGNATURE (x402 v2). Or run the local x420-mcp server with your own wallet key to pay automatically. Deliverable once paid: JSON: risk_score 0-100, level, flagged, matches[{rule, category, weight, count, snippets[]}], hidden_tag_text, note.

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": "x420_security_prompt-injection-scan"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesthe text to scan, up to 50,000 characters

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the annotations, the description discloses the 50 kB input cap, that the operation is pure code, the pricing ($0.002 USDC per call on Base), and most importantly that this hosted tool does not pay or return the deliverable but instead returns payment instructions (pay_to, network, price, x402 URL). That is exactly the kind of behavior an agent would otherwise get wrong on the first call. It also enumerates the paid deliverable fields, so the agent knows what a successful call yields.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core scan purpose is front-loaded and well organized, but the paragraph is bloated by a run-on disclaimer ('Not professional, legal, insurance, engineering, medical, financial or tax advice') and a dense payment-flow sentence that could be tightened. The information is largely useful, but several phrases do not earn their space.

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?

For a single-parameter read-only scan, the definition covers input scope, detection categories, risk-score output shape, heuristic caveat, and the two-phase payment flow, which is most of what an agent needs. The x402 sequence ('GET the url; read PAYMENT-REQUIRED from the 402; retry with PAYMENT-SIGNATURE') is compressed enough that a first-time caller may still stumble, keeping it from a 5.

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?

With a single parameter at 100% schema coverage, the schema baseline is 4, and the description reinforces it by restating the 50 kB limit and giving concrete examples of what the text may be. It adds no syntax or format guidance beyond that, so it does not exceed the baseline.

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 first sentence names a specific verb and resource: a heuristic scan of up to 50 kB of text for prompt-injection and data-exfiltration patterns. It then enumerates concrete pattern families (instruction overrides, role impersonation, zero-width hidden text, markdown image beacons, credential URLs), which makes the tool unmistakable against sibling tools like x420_security_action-gate or x420_security_cve.

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?

It gives clear usage context by naming the inputs the scan is meant for: a web page, email, tool result or document an agent is about to read. It also frames the result as 'a heuristic signal, not a determination', which tells the agent how much weight to give it. It does not name a sibling alternative or state an explicit when-not-to-use condition, so it stops short of a 5.

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