Skip to main content
Glama

Create a hosted checkout link

create_checkout_link

Assemble a cart and get a Stripe-hosted checkout URL the customer opens to pay; no card data passes through the agent. Item ids come from the search tools (diamond:<report>, setting:<slug>, jewelry:<slug>); a complete ring is one setting plus one diamond. Needs the shipping address (prices tax and shipping into the link). Expires after 24 hours. No credential needed. Without a production credential this tool runs in the sandbox: the link is simulated and no Stripe session is created. Pass env: "production" when the customer actually wants to buy — that returns a live, payable link.

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": {
      "items": "<items>",
      "shipping_address": "<shipping_address>",
      "context": "<context>",
      "llm_model": "<llm_model>"
    },
    "name": "create_checkout_link"
  }
}

Input Schema

NameRequiredDescriptionDefault
envNosandbox returns a simulated link and creates no Stripe session; production mints a live, payable Stripe Checkout link. Defaults to sandbox for anonymous callers and to the credential's environment otherwise. A sandbox credential is always sandbox.
itemsYesItems to buy; a complete ring is one setting plus one diamond
contextYesExplain in 15-25 words, in third person, why this tool is called and how it supports the user's goal. For analytics only. You MUST describe only the abstract purpose of the tool call. NEVER include, repeat, paraphrase, or infer personal, sensitive, or identifying information from the user request or tool results, including names, emails, phone numbers, IPs, IDs, or credentials. You MUST generalize specific entities into roles such as "a user", "the customer", or "an account". Example: "Retrieving a customer's recent orders to investigate a billing issue and help support determine the appropriate resolution."
llm_modelYesThe exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess.
buyer_nameNoBuyer full name
buyer_emailNoBuyer email for the receipt; Stripe collects it on the payment page when omitted
conversation_idNoPass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request.
shipping_addressYesWhere the order ships; used to price tax and shipping into the link

Output Schema

NameRequiredDescriptionDefault
urlYesThe Stripe-hosted checkout URL, when ready
statusYesready when a payable link was created; needs_input lists what is missing
messageYesHuman-readable outcome, including the link when ready
sandboxYesTrue when the link is simulated (sandbox): nothing is payable and no Stripe session was created. False means the link is live and payable.
tax_usdYesSales tax in US dollars for the given address
problemsYesWhat blocks the link when status is needs_input
total_usdYesTotal the buyer pays in US dollars
expires_atYesISO timestamp the link stops working
shipping_usdYesShipping in US dollars (0 = free insured FedEx)
subtotal_usdYesItems subtotal in US dollars

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / conversation_id / description
      Previous value: -"Echo the conversation_id from the server's previous response. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it."New value: +"Pass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request."
  2. Changed4 schema fields changed
    • removedOutput schema / properties / expires_at / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / expires_at / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / url / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / url / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  3. Changed1 schema field changed
    • addedInput schema / properties / items / maxItems
      Added value: +20
  4. Changed4 schema fields changed
    • addedInput schema / properties / context
      Added value: +{
      +  "description": "Explain in 15-25 words, in third person, why this tool is called and how it supports the user's goal. For analytics only. You MUST describe only the abstract purpose of the tool call. NEVER include, repeat, paraphrase, or infer personal, sensitive, or identifying information from the user request or tool results, including names, emails, phone numbers, IPs, IDs, or credentials. You MUST generalize specific entities into roles such as \"a user\", \"the customer\", or \"an account\". Example: \"Retrieving a customer's recent orders to investigate a billing issue and help support determine the appropriate resolution.\"",
      +  "type": "string"
      +}
    • addedInput schema / properties / conversation_id
      Added value: +{
      +  "description": "Echo the conversation_id from the server's previous response. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it.",
      +  "type": "string"
      +}
    • addedInput schema / properties / llm_model
      Added value: +{
      +  "description": "The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. \"claude-opus-4-8\", \"gpt-5.2\"). Used for analytics only. If you do not know your model identifier with certainty, pass \"unknown\" — never guess.",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "items",
      -  "shipping_address"
      -]New value: +[
      +  "items",
      +  "shipping_address",
      +  "context",
      +  "llm_model"
      +]
  5. Changed2 schema fields changed
    • addedInput schema / properties / env
      Added value: +{
      +  "description": "sandbox returns a simulated link and creates no Stripe session; production mints a live, payable Stripe Checkout link. Defaults to sandbox for anonymous callers and to the credential's environment otherwise. A sandbox credential is always sandbox.",
      +  "enum": [
      +    "production",
      +    "sandbox"
      +  ],
      +  "type": "string"
      +}
    • changedOutput schema / properties / sandbox / description
      Previous value: -"True on a sandbox credential: the link is simulated and nothing is payable"New value: +"True when the link is simulated (sandbox): nothing is payable and no Stripe session was created. False means the link is live and payable."
  6. Added

TDQS

A4.9/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnly=false, destructive=false) by disclosing what the tool creates (a hosted Stripe session), what it never touches (card data), link lifetime (24 hours), auth posture (no credential needed for sandbox), and the concrete side-effect difference between sandbox (no session created) and production (live payable link). That is exactly the mutation context an agent needs.

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

Conciseness5/5

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

Front-loads the core action and output, then layers constraints (id formats, ring composition, expiry, credentials, sandbox vs production) in short semicolon-joined clauses. Dense but zero filler; the production warning is placed last where it lands as the decisive instruction.

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?

An output schema exists so return values need no explanation, and all parameters are covered either by the 100%-described schema or the description. Remaining complexity — nested items, nested shipping_address, env enum, credential-dependent behavior — is addressed at the level an agent needs to call it correctly.

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% and the schema itself explains env, items, and the analytics params, so the baseline would be 3. The description still earns above baseline by tying item id formats to the sibling search tools and stating the setting+diamond composition rule, plus the shipping-address role in pricing tax and shipping.

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 concrete verb and artifact: 'Assemble a cart and get a Stripe-hosted checkout URL the customer opens to pay.' This is clearly distinguishable from the read-oriented siblings (search_diamonds, search_jewelry, read_article) and immediately conveys both action and output.

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?

Gives explicit routing rules: item ids come from the search tools, a complete ring is one setting plus one diamond, and `env: "production"` must be passed when the customer actually intends to buy. It also flags the implicit alternative (sandbox behavior) and its consequence, so an agent knows exactly which mode to pick.

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