Skip to main content
Glama

stripe_checkout_sessions_create

Create a Checkout Session and get a hosted payment URL for one-time or subscription purchases by passing price IDs and quantities.

Instructions

Create a Checkout Session and get a hosted payment URL. Pass line_items with price IDs and quantities, mode='payment' for one-time or mode='subscription' for recurring.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYesThe mode of the Checkout Session. Pass 'subscription' if the session includes at least one recurring item, 'payment' for one-time payments, 'setup' to save payment details for later.
uiModeNoThe UI mode of the session. Defaults to 'hosted_page'.
currencyNoThree-letter ISO currency code, in lowercase. Required in 'setup' mode when payment_method_types is not set.
customerNoID of an existing Customer, if one exists.
metadataNoSet of key-value pairs attached to the session.
cancelUrlNoIf set, Checkout displays a back button and sends customers here if they cancel.
expiresAtNoThe Epoch time in seconds at which the session expires. Between 30 minutes and 24 hours after creation; defaults to 24 hours. Seconds, not milliseconds: 1700000000, not 1700000000000.
lineItemsNoA list of items the customer is purchasing. Required for 'payment' and 'subscription' mode.
returnUrlNoWhere to send the customer after they authenticate or cancel. Required if ui_mode is 'embedded_page', 'elements' or 'form' with redirect-based methods.
successUrlNoThe URL to send customers to when payment or setup is complete. Required for the default hosted flow, and not allowed if ui_mode is 'embedded_page', 'elements' or 'form'.
customerEmailNoPrefills the customer's email. If not provided, customers are asked to enter it.
clientReferenceIdNoA unique string to reference the Checkout Session — a customer ID, a cart ID — used to reconcile the session with your own systems.
allowPromotionCodesNoEnables user-redeemable promotion codes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and openWorldHint=true, so the mutation/create nature is covered. The description usefully discloses the return value (a hosted payment URL), which matters since no output schema exists, but it omits side effects, session lifecycle, or what happens on expiry/cancellation.

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?

Two tight sentences: the action/outcome is front-loaded and the key parameters follow. Nothing is redundant or padded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 13-parameter, high-complexity tool the description is thin, though the rich schema (100% coverage) carries the parameter burden and the hosted-URL outcome is stated. It is sufficient to call correctly but leaves session behavior and the payment-vs-setup distinction under-explained.

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 all 13 parameters are already documented, and the description only echoes line_items and mode. It adds no syntax or constraints beyond the schema, so the baseline of 3 applies.

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?

The description states a specific verb+resource ('Create a Checkout Session') and even names the outcome ('get a hosted payment URL'), so the agent immediately understands what it produces. It does not, however, distinguish this tool from neighboring Stripe creation tools such as stripe_invoices_create or stripe_subscriptions_list.

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?

It gives concrete invocation guidance ('Pass line_items with price IDs and quantities', mode='payment' vs mode='subscription'), which implies usage. But it never says when to prefer this over alternatives like stripe_invoices_create, nor any prerequisites such as existing customers or prices.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.