Skip to main content
Glama

Verify an x402 endpoint before paying (paid $0.002)

x402_preflight

Avoid paying invalid x402 endpoints by verifying pre-payment. Checks 402 challenge, price and network match, TLS, host reachability, and OpenAPI.

Instructions

PAID $0.002 (x402, USDC on Base). Verify another x402 endpoint BEFORE paying it: does an unpaid call return a valid x402 v2 402 challenge? do the quoted amount/asset/network/payTo match the site's /.well-known/x402? is TLS valid, host reachable, openapi present? Returns pass/fail + per-check reasons + the parsed price you would pay. Args: url. Without payment returns the x402 challenge; pass x_payment to settle.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe x402 endpoint URL to verify, e.g. https://example.com/v1/thing.
x_paymentNox402 payment payload (base64) for this PAID check. If supplied it is forwarded as the X-PAYMENT header to settle the call and return the real result instead of a 402 challenge. Omit to get the price challenge first.
Behavior4/5

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

With no annotations provided, the description carries the burden of transparency. It discloses that the tool is paid ($0.002), what actions it performs (multiple verification checks), the return value (pass/fail + reasons + parsed price), and the effect of the x_payment header. It does not mention rate limits or authentication beyond the payment, but key behavioral traits are covered.

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 dense but reasonably concise, conveying paid status, purpose, verification checks, return value, and argument behavior in a single paragraph. It uses punctuation effectively to separate ideas, though the initial '(paid $0.002)' could be interpreted as clutter; overall it earns its place.

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?

No output schema exists, so the description clarifies that the tool 'Returns pass/fail + per-check reasons + the parsed price'. It also explains the x_payment flow, giving enough context for an agent to invoke the tool correctly in both modes. Given the tool's moderate complexity, the description is reasonably complete.

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?

Input schema describes both parameters with 100% coverage. The description adds context on how the parameters are used: 'url' is the endpoint to verify, and 'x_payment' is optional to 'settle the call' and 'return the real result instead of a 402 challenge'. This reinforces the schema and clarifies the conditional semantics of the optional parameter.

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 'Verify another x402 endpoint BEFORE paying it', which clearly identifies the verb (verify) and resource (x402 endpoint). It then enumerates specific checks (challenge validity, well-known config match, TLS, host reachability, OpenAPI), making the tool's purpose unambiguous and distinct from the sibling tools.

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?

The description states when to use the tool: before paying an x402 endpoint, and explains two usage modes (omit x_payment to receive the challenge, supply x_payment to settle). It does not explicitly contrast with alternatives, but the sibling tools are unrelated, and the usage context is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zvmzaretsky/fabtally-guard-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server