Skip to main content
Glama

X402 Git

Buy the latest release (x402)

purchase

Wraps GET /api/r/:owner/:slug — the same quote → screen → verify → settle → grant sequence, with the purchase recorded as source: mcp. Call it once with no payment: you get the x402 PaymentRequired body back. It arrives as isError: true per the x402 MCP transport, but it is not a failure — it is the price, and accepts[0] is the requirement to sign. Sign that EIP-3009 authorization with your own key (this server never sees it) and call again with the payment as the base64 payment_signature argument or as _meta["x402/payment"]. On success you get the version, the sha256 of the artifact, a signed download URL that expires in five minutes, and the settlement transaction in _meta["x402/payment-response"]. Access is granted only after the facilitator returns a transaction hash. A $0 listing returns granted on the first call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugYesThe listing slug, e.g. `humanizer`.
ownerYesThe creator handle, e.g. `adrian`.
quote_idNoRequired for any priced listing: echo `payment_required.extra.quote_id` from the 402 you are paying against. Omitting it on a priced buy is rejected `price_changed`; echoing a stale one is also `price_changed` with a fresh 402. Optional only for $0 listings.
wallet_signatureNoOptional `<address>.<nonce>.<signature>`. Send it to be quoted *your* price rather than the new-buyer price; when both are present the payer in the authorization must be the same address.
payment_signatureNoA base64 x402 payment payload signed locally against `accepts[0]` from a previous call. Equivalent to `_meta["x402/payment"]`; this argument wins when both are present. Omit both to get the 402.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

The description discloses significant behavior beyond annotations: the `isError: true` transport behavior, the meaning of `accepts[0]`, that the server never sees the signing key, the five-minute signed URL expiry, and that access is granted only after a transaction hash. This is far more behavioral detail than the sparse annotations provide.

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 information-dense and every sentence contributes to correct use, but it is presented as one long paragraph. The flow would be easier to parse with short sections or bullets for the 402 sequence, payment argument, and success response, so it loses one point for structure.

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?

For a tool with no output schema and a complex two-phase payment protocol, the description is remarkably complete: it explains the initial 402 response, the signing requirement, all payment input options, the success response contents, URL expiration, settlement metadata, and the zero-price case. An agent has enough context to invoke the tool correctly in each scenario.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Even with 100% schema description coverage, the description adds meaningful semantics: how `quote_id` must be echoed from the 402 and how stale values trigger `price_changed`, the meaning of `wallet_signature` for buyer-specific pricing, and the equivalence/precedence between `payment_signature` and `_meta["x402/payment"]`. This goes well beyond the schema text.

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 clearly states the action (purchase the latest release) and the exact resource/endpoint (`GET /api/r/:owner/:slug`), and details the full quote→screen→verify→settle→grant sequence. This distinguishes it from siblings like `check_version` and `fetch_release` because it is the only one that records a purchase and grants access.

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?

Provides explicit instructions for the two-call flow: call once without payment to receive the 402, sign it, then call again with the payment payload. It also covers the $0-listing shortcut and which argument wins when both payment forms are present. It does not explicitly mention alternatives among siblings, so it misses the full 'when not to use' 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