Skip to main content
Glama

Nightshift Labs: link, token & signature pre-checks

x402_preflight

Read-only

x402 seller preflight: check a paid endpoint BEFORE paying. Probes it unpaid, parses the 402 (v2 header or v1 body) and checks each option: scheme, network, asset is real USDC on Base, EIP-712 name/version match on-chain, payTo not a burn address, amount, timeout, discovery metadata. Plus on-chain seller reputation: recent USDC payments to payTo (last ~11 h: distinct payers, total, last payment). Returns verdict ok/caution/fail, issues and the recommended option. Price: $0.003 USDC on Base per call (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": {
      "url": "<url>"
    },
    "name": "x402_preflight"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYeshttps URL of the x402-paid endpoint
daysNoon-chain payer history window in days (default 3; at most ~11 h is scanned per call, see windowHoursCovered)
methodNoHTTP method to probe (default GET)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / days / description
      Previous value: -"on-chain payer history window in days (default 3)"New value: +"on-chain payer history window in days (default 3; at most ~11 h is scanned per call, see windowHoursCovered)"
  2. Changed1 schema field changed
    • addedInput schema / properties / days
      Added value: +{
      +  "description": "on-chain payer history window in days (default 3)",
      +  "maximum": 7,
      +  "minimum": 1,
      +  "type": "integer"
      +}
  3. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the readOnlyHint/openWorldHint annotations, the description discloses the paid-call cost ('$0.003 USDC on Base per call'), the unpaid probing behavior, and the exact return contract (verdict ok/caution/fail plus issues and recommendation). It also flags the real limitation that only ~11 h of payer history is scanned per call, which the agent needs to interpret results correctly.

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 'before paying' trigger are front-loaded, and the checklist sentence is dense but each item earns its place by telling the agent what will be validated. It is on the long side with some packing ('Plus on-chain seller reputation'), but no sentence is filler.

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?

With no output schema, the description correctly compensates by describing the returned verdict values and payload. It is nearly complete for a read-only probe, with only minor gaps around failure modes (unreachable URL, non-x402 endpoint) that an agent might hit.

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 parameter documentation is already strong, but the description adds meaning by explaining what the reputation window feeds ('recent USDC payments to payTo ... distinct payers, total, last payment') and reiterating the ~11 h scan cap that qualifies the days parameter. The method parameter is left entirely to the schema.

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 opening clause pairs a specific verb and resource ('x402 seller preflight: check a paid endpoint BEFORE paying') and immediately explains the mechanism: probing unpaid and parsing the 402 response. The enumerated checks (scheme, network, USDC on Base, EIP-712 name/version, payTo, amount, timeout, discovery metadata) make it impossible to confuse with siblings like base_token_check or evm_typed_data_check.

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 a clear trigger condition — run this before paying an x402 endpoint — which is the primary decision an agent faces. It does not, however, name an alternative or state when to skip the preflight (e.g., already-trusted sellers or non-x402 URLs), so guidance is strong but not fully contrasting.

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.