Skip to main content
Glama

Buy access to a paid item

product_checkout

Requires a JWT or an rk_ key. Buy product_id for YOURSELF. rail 'x402' with no signature returns an x402 challenge (accepts: Solana exact USDC, payTo, maxAmountRequired — the exact amount binds the payment to your order); transfer that USDC, wait for finality, then call again with signature = the transaction signature — it is verified on-chain and settles at once. rail 'usdc' + payer_wallet returns pay instructions that confirm on their own within a minute. rail 'sol' + payer_wallet pays in native SOL: the USD price is quoted in exact base units at the live price (valid 60 seconds, up to $250 a payment; refused before anything is created when the price is stale or the market cannot fill it) — send EXACTLY that amount from payer_wallet to pay_to before expires_at and it confirms on its own; any other amount, sender or a later transfer does not settle (the creator is still paid their 80% in USDC). rail 'card' returns a Stripe URL for a human. rail 'signet' (signed-in session only, never an rk_ key) pays from your own USDC Signet mandate — autonomous pays inside its caps at once, guarded parks for your approval tap. Then run the item normally; purchases_mine shows what you hold. To remove Rokha's branding from one of your own domains (white label, one payment per domain), buy the product page_domain_status names under white_label_price and pass that domain as domain; the answer is status: applied (nothing charged) when a payment already made was used on it.

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": {
      "product_id": "<product_id>",
      "rail": "<rail>"
    },
    "name": "product_checkout"
  }
}

Input Schema

NameRequiredDescriptionDefault
railYesx402, usdc, sol or rokha for an agent (no browser); card returns a Stripe URL for a human; signet pays from your own USDC mandate.
domainNoOnly for a product bought for one of your own domains (page_domain_status names it under white_label_price): that domain, like www.example.com. It must be a domain already set on your account.
ref_codeNoOptional: the handle of whoever referred you — they earn 5% out of Rokha's share, never the creator's.
signatureNox402 rail, second call: the transaction signature of your USDC payment.
product_idYesThe product's id (product_get).
payer_walletNoThe wallet you will pay from (usdc, sol and rokha rails).

Output Schema

NameRequiredDescriptionDefault
payNo
modeNo
pay_toNo
acceptsNo
productNo{id, kind, ref, title, model, price_cents, price, runs_per_pack, active, checkout_url}
referenceNo
expires_atNo
no_refundsNo
checkout_urlNo
no_refunds_noteNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / domain
      Added value: +{
      +  "description": "Only for a product bought for one of your own domains (page_domain_status names it under white_label_price): that domain, like www.example.com. It must be a domain already set on your account.",
      +  "maxLength": 253,
      +  "type": "string"
      +}
  2. Changed2 schema fields changed
    • addedOutput schema / description
      Added value: +"The open order on the rail you chose; `mode` names it. usdc / x402 / sol / rokha: reference, pay_to, pay {asset, chain, address, note} and the exact amount (amount_usdc, or quote + the base units) to send before expires_at; x402 with no signature also carries accepts; card: a Stripe checkout_url; x402 with a signature: the settled purchase."
    • addedOutput schema / properties
      Added value: +{
      +  "accepts": {
      +    "items": {
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  "checkout_url": {
      +    "type": "string"
      +  },
      +  "expires_at": {
      +    "type": "string"
      +  },
      +  "mode": {
      +    "type": "string"
      +  },
      +  "no_refunds": {
      +    "type": "boolean"
      +  },
      +  "no_refunds_note": {
      +    "type": "string"
      +  },
      +  "pay": {
      +    "type": "object"
      +  },
      +  "pay_to": {
      +    "type": "string"
      +  },
      +  "product": {
      +    "description": "{id, kind, ref, title, model, price_cents, price, runs_per_pack, active, checkout_url}",
      +    "type": "object"
      +  },
      +  "reference": {
      +    "type": "string"
      +  }
      +}
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
  4. Changed4 schema fields changed
    • addedInput schema / properties / payer_wallet / description
      Added value: +"The wallet you will pay from (usdc, sol and rokha rails)."
    • addedInput schema / properties / product_id / description
      Added value: +"The product's id (product_get)."
    • addedInput schema / properties / rail / description
      Added value: +"x402, usdc, sol or rokha for an agent (no browser); card returns a Stripe URL for a human; signet pays from your own USDC mandate."
    • addedInput schema / properties / signature / description
      Added value: +"x402 rail, second call: the transaction signature of your USDC payment."
  5. Changed1 schema field changed
    • changedInput schema / properties / rail / enum
      Previous value: -[
      -  "x402",
      -  "usdc",
      -  "sol",
      -  "card",
      -  "signet",
      -  "fuel"
      -]New value: +[
      +  "x402",
      +  "usdc",
      +  "sol",
      +  "rokha",
      +  "card",
      +  "signet"
      +]
  6. Changed1 schema field changed
    • addedInput schema / properties / ref_code
      Added value: +{
      +  "description": "Optional: the handle of whoever referred you — they earn 5% out of Rokha's share, never the creator's.",
      +  "type": "string"
      +}
  7. Changed1 schema field changed
    • changedInput schema / properties / rail / enum
      Previous value: -[
      -  "x402",
      -  "usdc",
      -  "card",
      -  "signet",
      -  "fuel"
      -]New value: +[
      +  "x402",
      +  "usdc",
      +  "sol",
      +  "card",
      +  "signet",
      +  "fuel"
      +]
  8. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=false and destructiveHint=false, so the description carries the real behavioral load and does so: settlement is verified on-chain, the SOL price quote is valid 60 seconds with a $250 cap and is refused before anything is created, wrong amount/sender/late transfers do not settle, signet pays autonomously within caps or parks for approval, and a reused payment on a white-label domain returns 'status: applied' with nothing charged.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is front-loaded with the auth prerequisite and the primary call, which is good, but the body is a single dense paragraph of em-dash clauses covering six rails plus a white-label edge case. The information is largely load-bearing, yet the rail-by-rail mechanics would be far more scannable as a list than as one run-on block.

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 six-parameter, six-rail payment tool with an output schema already present, nothing an agent needs before calling is missing: auth, rail selection, the two-phase x402 handshake, amount/expiry binding, refusal conditions, and the white-label special case are all disclosed.

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?

Schema coverage is 100%, so baseline is 3, but the description adds sequencing meaning the schema cannot: 'signature' is a second-call argument carrying the transaction signature, 'payer_wallet' only applies to usdc/sol/rokha, 'domain' exists solely for white-label purchases on an already-claimed domain, and the SOL amount must match pay_to/expires_at exactly. Only 'ref_code' receives no additional narrative beyond its 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 states a specific verb and resource ('Buy product_id for YOURSELF') and immediately enumerates the distinct purchase mechanisms. It also separates this from the read-only sibling 'purchases_mine shows what you hold', so an agent can tell the buy path from the inspection path without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives per-branch routing rules: 'x402' with no signature for an agent challenge, 'usdc' + payer_wallet for self-confirming instructions, 'sol' for native SOL, 'card' returns a Stripe URL for a human, 'signet' is signed-in-session only and never an rk_ key. It also names the precondition (JWT or rk_ key) and the white-label variant's trigger (page_domain_status names the product under white_label_price).

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.