Skip to main content
Glama

Pre-flight x402 security audit & prompt-injection detector

x402_paywall_probe
Read-onlyIdempotent

Probe x402 endpoints unpaid to validate price limits and detect SIWx spoofing, fake USDC, and prompt-injection risks before paying.

Instructions

[$0.002] Pre-flight x402 endpoint security firewall & prompt-injection detector. Probes any URL unpaid to catch price spikes, SIWx spoofing, fake USDC, and prompt injections ($0.002/call). Do not use for EVM calldata simulation (use evm_tx_simulate) or token bytecode scans (use token_honeypot_scan). method sets the HTTP probe verb (GET vs POST) used to trigger the 402 header, deep_audit=true runs prompt-injection checks, and max_acceptable_usd caps price validation. Live HTTP probe, read-only; requires x402 USDC or Stripe MPP (10 free lifetime calls via /api/free/*) at 30-60 req/min.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "x402_paywall_probe"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoTarget x402 endpoint URL to inspect (https only)
methodNoHTTP method for the unpaid probePOST
deep_auditNoAdd one local-LLM prompt-injection audit of the 402 metadata
session_tokenNoOptional prepaid session token (x402s_...) from https://apix402data.com/pay after the 10-call free preview.
max_acceptable_usdNoYour maximum acceptable price in USD

Output Schema

NameRequiredDescriptionDefault
probeNo
cachedNo
checksNo
pay_toNo
networkNo
endpointNo
warningsNo
final_urlNo
deep_auditNo
risk_levelNo
risk_scoreNo
target_urlNo
safe_to_payNo
x402_versionNo
schema_versionNo
payment_optionsNo
quoted_price_usdNo
cache_age_secondsNo
max_acceptable_usdNo
stripe_mpp_offeredNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv5.3.0

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the readOnly/destructive annotations, the description discloses that this is a live HTTP probe, that payment is required (x402 USDC or Stripe MPP) with a 10-call free preview, and that throughput is 30-60 req/min. That is substantial behavioral context an agent would otherwise have to discover by failing.

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 purpose and the anti-use cases are front-loaded, and the parameter notes are compact. There is mild redundancy: the $0.002 price appears twice and 'prompt-injection' is stated in both the opening and the parameter gloss.

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 5-parameter read-only probe with a full schema and an output schema, the description covers purpose, exclusions, cost, auth, and rate limits. It does not address edge cases such as non-x402 URLs or probe failures, but nothing essential for correct invocation is missing.

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 100%, so the baseline is 3, but the description adds real semantics: `method` is described as the verb that triggers the 402 header, `deep_audit` as enabling prompt-injection checks, and `max_acceptable_usd` as the price-validation cap. session_token is only covered by the schema, so it is not fully additive.

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 states a specific verb and resource ('Pre-flight x402 endpoint security firewall', 'Probes any URL unpaid') and names concrete threats it detects (price spikes, SIWx spoofing, fake USDC, prompt injections). It also distinguishes itself from evm_tx_simulate and token_honeypot_scan, so an agent can route correctly without opening a 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?

Explicit negative guidance is given with named alternatives: 'Do not use for EVM calldata simulation (use evm_tx_simulate) or token bytecode scans (use token_honeypot_scan)'. The pre-flight/pre-signing context and the free-tier condition ('10 free lifetime calls via /api/free/*') further tell the agent when this tool applies.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.