Skip to main content
Glama

preview_checkout

Preview the complete order summary before payment. Advances the session to ready-for-payment state.

PREFER THE CART CARD: if there is an interactive card for this cart, let it compute and show the summary instead of calling this tool yourself — it keeps the flow in one card. Checkout guide: read the MCP resource trusteed://guides/checkout. CREDENTIAL: this store needs one. Call the create_sandbox_key tool first (it is in this tool list and needs no credential), then pass the key you get back as the agent_key argument — or as an Authorization: Bearer header if your client can set headers. Do not ask a person to log in: there is no human login for this store.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cart_idYesCart session ID returned by create_cart
agent_keyNoSandbox credential from `create_sandbox_key`. Use this when your client cannot set an `Authorization: Bearer` header.
payment_mandateNoPayment mandate with `mandate_id`, `max_amount_cents` (integer, minor units), `currency` (3 letters, must match the cart's), `exp` (expiry as an INTEGER of Unix seconds — not an ISO 8601 date string), `sub` (the identity you authenticate as — it is compared against it) and `aud` (the store slug this mandate is for, e.g. the slug in the URL you are calling — not a domain). It is a spending cap you declare to limit yourself: it authorises nothing and does not prove the buyer's consent. Use this when your client cannot set an `X-Payment-Mandate` header.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYes
statusYes
currencyYes
next_stepNo
tax_centsYes
expires_atNo
store_nameYes
tax_statusYes
total_noteYes
approval_idNo
total_centsYes
approval_urlNo
discount_centsYes
shipping_centsYes
shipping_titleNo
subtotal_centsYes
total_is_finalYes
payment_optionsNo
shipping_sourceNo
next_step_messageNo
expires_in_secondsNoWhole seconds left on this checkout SESSION at response time (0 when already past). It is not a stock reservation and not a price guarantee.
approval_status_urlNo
checkout_session_idYes
shipping_authoritativeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare a non-read-only, non-idempotent mutation, and the description adds genuinely useful context beyond them: it advances the session to ready-for-payment, requires a sandbox credential, and clarifies there is no human login. It doesn't describe what happens on repeated calls or failure modes, but the auth and side-effect disclosure is substantive.

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?

Front-loads the purpose and state effect in the first sentence, then layers preference, guide, and credential instructions. It is dense and mostly earns its length, though the credential paragraph is long enough that some repetition of the schema's agent_key semantics could be trimmed.

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?

For a 3-param mutation tool with an output schema (so return values need no explanation) and full annotation coverage, the definition supplies the prerequisite credential flow, the guide pointer, and the card alternative. Complete enough to invoke correctly; only edge-case behavior (repeat calls, failure handling) is unaddressed.

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% and every parameter (cart_id, agent_key, payment_mandate with all sub-fields) is fully documented in the schema. The description reinforces the agent_key credential path but adds no format or constraint detail the schema lacks, so the baseline 3 applies.

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 specific verb and resource ('Preview the complete order summary before payment') and adds the state transition it causes ('Advances the session to ready-for-payment state'), which cleanly separates it from complete_checkout and the ucp_* checkout siblings.

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 an explicit alternative ('PREFER THE CART CARD'), points at the checkout guide resource, and spells out the prerequisite order: call create_sandbox_key first, then pass agent_key or an Authorization header. It also rules out the wrong path ('Do not ask a person to log in').

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