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 it. Fetches it unpaid, parses the 402 (v2 payment-required header or v1 body) and checks every payment option: scheme, network/testnet, asset is real native USDC on Base, EIP-712 extra.name/version match the token on-chain (prevents invalid_exact_evm_token_name_mismatch), payTo not a burn address (plus contract/tx-count/USDC balance), amount, maxTimeoutSeconds, discovery metadata. Plus seller reputation on-chain: incoming USDC transfers to payTo on Base over the last 3 days (1-7 via ?days=): distinct payers, total USDC, transfers at the advertised price, top-payer share, hours since last payment. Returns verdict ok/caution/fail, issues and the recommended option. Price: $0.005 USDC on Base per call (x402).

Input Schema

NameRequiredDescriptionDefault
urlYeshttps URL of the x402-paid endpoint
daysNoon-chain payer history window in days (default 3)
methodNoHTTP method to probe (default GET)

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +}
  2. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the readOnly/openWorld annotations, the description discloses the unpaid fetch behavior, v1/v2 402 parsing, on-chain USDC and payTo checks, reputation window semantics, return verdict values, recommended option, and even the per-call price. This is unusually rich behavioral context for an agent deciding whether and how to call it.

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 front-loaded and every major clause is substantive, but the dense semicolon-separated list makes it harder to scan. Some jargon such as invalid_exact_evm_token_name_mismatch could be trimmed or clarified.

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?

For a complex, multi-check tool with no output schema, the description covers what is inspected, what the result verdict looks like, and what recommendation is returned. Important operational details such as cost, unpaid probing, and reputation timing are included.

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 description coverage is 100%, so the schema already documents url, method, and days. The description only slightly extends this by explaining that days controls the seller-reputation history window, but it adds little for url or method beyond what the schema provides.

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: preflight-check an x402-paid endpoint before paying it. It clearly distinguishes the tool from a payment action and from generic base_* blockchain tools by focusing on 402 parsing, payment-option validation, and seller reputation.

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 timing instruction: use this before paying a paid endpoint. It does not name explicit alternatives or when-not-to-use conditions, but no direct sibling performs this same preflight function.

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