Skip to main content
Glama

create_checkout_session

Create a per-customer checkout session: resolves (or provisions) the customer's own vault from your externalCustomerId, mints a payment request that settles into it, and returns checkoutUrl + x402Url. The paid webhook then carries customer identity. Price from productSlug or ad-hoc amountUsd.

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": {
      "customer": "<customer>"
    },
    "name": "create_checkout_session"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainIdNoChain for ad-hoc sessions (default base-mainnet)
customerYesYour customer identity — vault is resolved per (namespace, externalId)
metadataNoOptional metadata object
amountUsdNoAd-hoc price in USD (alternative to productSlug)
referenceNoYour order/session id, echoed on every webhook
descriptionNoOptional checkout note
productSlugNoPrice from an existing payment product (SKU)
idempotencyKeyNoSafe retries — same key returns the same session
expiresInMinutesNoSession TTL (default 60, product default wins if set)
amountSmallestUnitNoAd-hoc USDC amount in smallest units

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does meaningful work: it discloses a real side effect ('resolves (or provisions) the customer's own vault'), the downstream settlement path into that vault, and the return contract (checkoutUrl + x402Url) plus webhook identity propagation. It does not cover auth/permission requirements, failure modes, or what happens if the customer already exists.

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?

Three dense sentences, front-loaded with the action and its side effect, then the outputs, then pricing. No filler, though the run-on second sentence packs several distinct behaviors together in a way that is slightly harder to parse than it needs to be.

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?

Given ten parameters (one nested), a 100% documented schema, no output schema and no annotations, the description covers the essential model: identity → vault → payment request → checkout/x402 URLs → webhook. It is thin on the peripheral parameters (chainId, amountSmallestUnit, idempotencyKey, expiresInMinutes), but those are fully described in the schema.

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 description coverage is 100%, so the schema already documents all ten parameters thoroughly, including that amountUsd is 'alternative to productSlug'. The description's pricing sentence largely restates that relationship; its only genuine addition is linking externalCustomerId to per-customer vault resolution, which is already echoed in the customer property description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Starts with a specific verb+resource ('Create a per-customer checkout session') and then spells out the composite mechanics: vault resolution/provisioning from externalCustomerId, payment-request minting, and the two returned URLs. This makes it functionally distinct from lower-level siblings like create_payment_request or create_payment_product, though it never names an alternative explicitly.

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

Usage Guidelines3/5

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

Usage is only implied: 'per-customer checkout session' plus 'The paid webhook then carries customer identity' signals when this is preferable to a plain payment request, and 'Price from productSlug or ad-hoc amountUsd' hints at the two pricing modes. There is no explicit when-to-use/when-not-to-use statement and no named alternative among the many payment siblings.

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