Skip to main content
Glama

x402 Agent Utilities

x402 precheck

x402_precheck
Read-only

Pre-payment check of an x402 endpoint (0.002 USDC via x402, with an optional free trial of 1024 unpaid calls per IP per UTC day; HTTP and MCP share a bucket): reachable?, latency, live payment terms, canonical-USDC check, and whether terms match its PayAI Bazaar listing. Never pays the target.

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 URL to check
methodNoGET
compareDirectoryNotrue

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the readOnlyHint/openWorldHint annotations by disclosing the price (0.002 USDC), the 1024-call-per-IP-per-UTC-day free tier, and the fact that HTTP and MCP share one bucket. It also states the side-effect boundary plainly ("never pays the target"), which is exactly the safety context an agent needs before calling an open-world tool.

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?

Front-loaded with purpose and return values, and every clause carries information (price, free tier, bucket sharing, no-payment guarantee). It is compressed into one heavily parenthesized sentence, which makes it dense on first read but wastes no words.

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 responsibly enumerates the returned checks so the agent knows what to expect. Cost and rate-limit framing are covered; what is missing is the effect of the method parameter and any error/failure semantics for unreachable endpoints.

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 coverage is only 33%: url is documented, but method and compareDirectory have bare enums with no descriptions. The description partially compensates by explaining the directory comparison ("whether terms match its PayAI Bazaar listing"), but says nothing about what method GET vs POST means for the probe, leaving one of three params uninterpretable.

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?

Names a specific verb-plus-resource (pre-payment check of an x402 endpoint) and enumerates exactly what the check returns: reachability, latency, live payment terms, canonical-USDC validity, and Bazaar-listing match. "Never pays the target" pins down what it is not, separating it from an actual payment action.

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?

"Pre-payment check" plus the stated 0.002 USDC cost and free-trial allowance gives a clear context for when to call it: before committing funds. It does not name an alternative or state explicit when-not conditions, so it falls short of full routing guidance.

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