Skip to main content
Glama

Is my x402 endpoint correct?

check_x402_endpoint
Read-onlyIdempotent

x402 endpoint doctor: probes a paid x402 URL unpaid (never pays) and grades it A-F: 402 on GET / HEAD / empty POST, CORS, v2 PAYMENT-REQUIRED header and v1 body, accepts (USDC asset, EIP-712 domain, Solana feePayer, amounts, payTo), multichain consistency and the discovery metadata. Free preview tier: grade, score, status and counts. The paid x402 endpoints /v1/lite ($0.005), /v1/check ($0.02, adds an external validation verdict, payee checks and generated fixes) and /v1/site ($0.05, whole origin) return the fix list.

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": "check_x402_endpoint"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesFull https URL of the paid x402 route (site tier: the origin or API base URL)
methodNoMethod your paid route uses (default: from its discovery metadata, else GET)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / method / description
      Previous value: -"Method your paid route uses (default: from its Bazaar declaration, else GET)"New value: +"Method your paid route uses (default: from its discovery metadata, else GET)"
  2. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint, but they do not convey the most important behavior: the probe is performed unpaid and 'never pays', which is a critical safety fact for an agent hitting a paid route. The description also discloses per-tier output differences and prices, adding real value beyond annotations, though it doesn't say how long a probe takes or how failures/timeouts are reported.

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 the identity ('x402 endpoint doctor') and the key constraint ('never pays'), then layers the checklist and tier pricing. The middle check-list clause is a dense run-on, but every element maps to something the agent needs: scope, checks, cost, and output shape per tier.

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 burden of return values and does so per tier (grade/score/status/counts for free, verdict/payee checks/fixes and fix list for paid). Combined with 100% schema coverage on two simple parameters, nothing needed to call the tool 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 coverage is 100% and both parameters are fully described in-schema, including the enum on method and the URL format. The description adds essentially nothing parameter-specific beyond implicitly supporting the 'site tier' origin form already noted in the url field, so the baseline of 3 applies.

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?

States a specific verb and resource: probes a paid x402 URL without paying and grades it A-F. The enumerated checks (402 on GET/HEAD/empty POST, CORS, PAYMENT-REQUIRED header, accepts fields, multichain consistency, discovery metadata) make the tool's scope unmistakable without opening the schema.

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?

Clearly frames the free preview tier ('grade, score, status and counts') versus the paid tiers that add a validation verdict, payee checks and generated fixes. What's missing is explicit routing language — there is no tier parameter, so an agent must infer that invoking this tool yields the free preview only and that the paid paths are separate endpoints.

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