Skip to main content
Glama

x402 agent toolkit: service finder, payment safety, Solana & web tools

Pre-check an x402 payment

x402_precheck
Read-onlyIdempotent

[FREE tier 20/day, then $0.005] Before paying an x402 endpoint: fetch it, validate its HTTP 402 payment requirements (scheme, network, payTo, amount, asset) and screen payTo against the OFAC SDN crypto-address list. Returns verdict ok|warn|block|not_402. Free to try: 20 MCP calls/day per client, no API key or wallet needed (beyond that: prepaid credits via header X-API-Key, see server instructions).

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

Input Schema

NameRequiredDescriptionDefault
urlYesx402 endpoint you plan to pay
methodNoHTTP method the endpoint expects; default GET

Output Schema

NameRequiredDescriptionDefault
optionsYes
reasonsYes
summaryNo
verdictYes
warningsYes
riskScoreNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already cover read-only, idempotent, non-destructive, and open-world behavior; the description adds substantial context beyond them: the outbound network fetch, the OFAC SDN screening step, the enumerated verdict vocabulary (ok|warn|block|not_402), and concrete rate-limit and auth conditions (20 calls/day free, no wallet or API key needed, X-API-Key for paid credits). That is exactly the operational detail an agent needs before invoking 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 whole definition is two dense sentences with no filler; the validation targets and verdict set are front-loaded after the pricing tag. The bracketed pricing prefix is slightly noisy but does carry decision-relevant cost information. Minor cost: the parenthetical about credits is long and pushes the server-instructions pointer to the tail.

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?

An output schema exists, so return-value documentation is not required, and annotations cover the safety profile. The description still supplies the missing operational pieces — auth model, quota, and what the verdict means. For a two-parameter, open-world read tool, nothing an agent needs to call it correctly is absent.

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%, and both parameters (url with an example, method with an enum and GET default) are fully documented in the schema. The description's phrase 'x402 endpoint you plan to pay' reinforces the url semantics but adds no new syntax, format, or constraint information. Baseline 3 applies since the schema carries the parameter burden.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb sequence (fetch, validate, screen) and enumerates exactly what is checked: scheme, network, payTo, amount, asset, plus OFAC SDN screening of payTo. It also names the possible verdicts, so an agent knows precisely what the tool produces. It stops short of naming a sibling such as x402_verify_settlement as the post-payment alternative, so sibling differentiation is only implicit in the phrase 'Before paying'.

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?

Timing guidance is explicit and actionable: use this before paying an x402 endpoint, i.e., as a pre-flight gate. The free-tier and credit conditions ('20 MCP calls/day per client', then prepaid credits via X-API-Key) further clarify when the tool is usable. No explicit exclusions or named alternatives are given, so it falls short of a full when/when-not treatment.

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