Skip to main content
Glama

x402 Endpoint Check

x402_check
Read-only

Check an x402 endpoint before paying it. Makes one unpaid call, reads the 402 payment terms (v1 body or v2 header) and validates every option: the token is the official USDC contract for its network (not a look-alike), the price parses, the terms point back at the URL you called. Screens the payTo wallet (OFAC sanctions, scam list, on-chain basics), checks the site against 360k+ crypto phishing domains and its domain age, and reads the endpoint's public record on nohumans.directory (verified, delivered when bought). Returns do_not_pay / caution / no_problems_found with reasons, plus the cheapest option. Price: $0.005 USDC per call (x402). Free sample: call free_sample with tool="x402_check".

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_check"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoThe x402 endpoint you are about to pay, with its parameters
methodNoGET (default) or POST: how you will call it
max_priceNoOptional: your budget per call in USD; a higher price is flagged

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?

Annotations only declare readOnlyHint and openWorldHint; the description adds substantial context beyond them, including that the call is unpaid, which data sources are consulted, the exact verdict vocabulary (do_not_pay / caution / no_problems_found) plus the cheapest option, and the per-call cost of $0.005 USDC. That cost and return-value disclosure is exactly what an agent needs before invoking a paywalled check.

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 cost are front-loaded, and the middle run of validation steps is dense but informative. The phishing/domain-age and directory sentences could be tightened into one clause without losing meaning, so it is efficient rather than perfectly lean.

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?

With no output schema, the description carries the return burden and does so by naming the three verdicts and the cheapest-option field. It also discloses pricing and points to a free alternative, so nothing material is missing for a three-parameter, zero-required read-only check.

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 url, method, and max_price are already documented in structured form. The description reinforces the intent ('the terms point back at the URL you called,' budget flagging) but adds no new syntax, formats, or edge-case meaning beyond the schema, which is the baseline-3 case.

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 opens with a specific verb and resource: 'Check an x402 endpoint before paying it.' It then enumerates the concrete checks performed (402 terms parsing, USDC contract verification, payTo sanctions screening, phishing-domain match, directory lookup), which clearly separates it from siblings like wallet_risk or sanctions_screen that do only one of those things.

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 states the operating context plainly: run this before paying an endpoint. It also routes to an alternative path ('Free sample: call free_sample with tool="x402_check"') for cost-free evaluation. It stops short of explicit when-not-to-use exclusions, such as when a plain dns_lookup or sanctions_screen alone would suffice.

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