Skip to main content
Glama

create_checkout

Idempotent

Get a hosted-checkout link outside beta. Disabled while beta pricing is free.

    The REQUIRED idempotency_key creates or replays one durable order and Stripe is
    called under an order-derived key, so a retry never mints a second order or
    session. Args: pack (from pricing.credit_packs), idempotency_key,
    success_url/cancel_url, api_key (spend). Returns {checkout_url, pack, credits,
    usd_cents, expires_at, order_id, order_state, replayed}. Errors: unauthorized,
    forbidden, invalid_request, idempotency_conflict, payments_disabled, rate_limited.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
packYesWhich credit pack to buy, given as its CREDITS amount and matched against pricing.credit_packs exactly (not a dollar figure and not an index). A value that is not an offered pack is invalid_request.
api_keyNoAPI key for this call. Omit to fall back to the Authorization: Bearer / X-API-Key request header (streamable-HTTP only), then the VHGENGINE_API_KEY env var (the stdio default). No key resolvable -> unauthorized.
cancel_urlNoWhere Stripe sends the browser if your human abandons checkout. At most 2048 characters. Omit to use the deployment's default.
success_urlNoWhere Stripe sends the browser after a successful payment. At most 2048 characters. Omit to use the deployment's default landing page.
idempotency_keyYesREQUIRED caller-chosen replay key for this checkout. The same key replays the same durable order and Stripe session (never a second charge intent); the same key with different arguments is an idempotency_conflict. Matches REST's required Idempotency-Key header.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
packNoWhich pack this session buys.
creditsNoCredits that land on your balance after the webhook confirms payment.
usd_centsNoWhat your human is charged, in cents.
expires_atNoWhen the checkout link stops working, ISO-8601 UTC.
checkout_urlNoThe URL your human opens to pay. Single use.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / idempotency_key
      Added value: +{
      +  "description": "REQUIRED caller-chosen replay key for this checkout. The same key replays the same durable order and Stripe session (never a second charge intent); the same key with different arguments is an idempotency_conflict. Matches REST's required Idempotency-Key header.",
      +  "title": "Idempotency Key",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "pack"
      -]New value: +[
      +  "pack",
      +  "idempotency_key"
      +]
  2. Changed1 schema field changed
    • changedOutput schema / description
      Previous value: -"A Stripe hosted-checkout link to hand to your human. You never touch a card."New value: +"A hosted-checkout compatibility shape. The tool is disabled during the free beta."
  3. Changed12 schema fields changed
    • addedInput schema / properties / api_key / description
      Added value: +"API key for this call. Omit to fall back to the Authorization: Bearer / X-API-Key request header (streamable-HTTP only), then the VHGENGINE_API_KEY env var (the stdio default). No key resolvable -> unauthorized."
    • changedInput schema / properties / cancel_url / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "maxLength": 2048,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / cancel_url / description
      Added value: +"Where Stripe sends the browser if your human abandons checkout. At most 2048 characters. Omit to use the deployment's default."
    • addedInput schema / properties / cancel_url / maxLength
      Added value: +2048
    • addedInput schema / properties / pack / description
      Added value: +"Which credit pack to buy, given as its CREDITS amount and matched against pricing.credit_packs exactly (not a dollar figure and not an index). A value that is not an offered pack is invalid_request."
    • addedInput schema / properties / pack / minimum
      Added value: +1
    • changedInput schema / properties / success_url / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "maxLength": 2048,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / success_url / description
      Added value: +"Where Stripe sends the browser after a successful payment. At most 2048 characters. Omit to use the deployment's default landing page."
    • addedInput schema / properties / success_url / maxLength
      Added value: +2048
    • addedOutput schema / description
      Added value: +"A Stripe hosted-checkout link to hand to your human. You never touch a card."
    • addedOutput schema / properties
      Added value: +{
      +  "checkout_url": {
      +    "description": "The URL your human opens to pay. Single use.",
      +    "type": [
      +      "string",
      +      "null"
      +    ]
      +  },
      +  "credits": {
      +    "description": "Credits that land on your balance after the webhook confirms payment.",
      +    "type": [
      +      "number",
      +      "null"
      +    ]
      +  },
      +  "expires_at": {
      +    "description": "When the checkout link stops working, ISO-8601 UTC.",
      +    "type": [
      +      "string",
      +      "null"
      +    ]
      +  },
      +  "pack": {
      +    "description": "Which pack this session buys.",
      +    "type": [
      +      "number",
      +      "null"
      +    ]
      +  },
      +  "usd_cents": {
      +    "description": "What your human is charged, in cents.",
      +    "type": [
      +      "number",
      +      "null"
      +    ]
      +  }
      +}
    • removedOutput schema / title
      Removed value: -"create_checkoutDictOutput"
  4. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  5. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Beyond the idempotentHint annotation, the description thoroughly explains idempotency behavior ('creates or replays one durable order... retry never mints a second order or session'), the disabled state during beta, and lists possible errors. It reinforces the annotation without contradiction.

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 structured with a clear opening line stating purpose, followed by a paragraph on idempotency, a compact argument list, return format, and error enumeration. It is efficient, though the run-on style of the first sentence could be split for readability.

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?

The description covers all critical aspects: expected inputs (including required idempotency_key), behavioral guarantees (idempotent replay), return format (though output schema exists), error scenarios, and a current operational constraint (disabled during beta). It is complete for a checkout-creation tool.

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%, so baseline is 3. The description adds minimal value by referencing 'pack (from pricing.credit_packs)' and noting api_key as 'spend', but the individual parameter descriptions in the schema are already detailed. No significant extra meaning is provided.

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 tool obtains a hosted-checkout link, with 'Get a hosted-checkout link outside beta' acting as a specific verb+resource. It distinguishes itself from siblings by focusing on checkout creation and explicitly notes a temporary disabled state during free beta pricing.

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?

The description implies usage (when you need a checkout link) but does not explicitly state when not to use it or mention alternatives. It does provide context like idempotency and error conditions, but no direct comparison to sibling tools.

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