Skip to main content
Glama

ucp_create_checkout

Idempotent

Create a UCP (Universal Commerce Protocol) checkout session from line items. Returns a UCP checkout object with status 'incomplete'. Starts the UCP flow (ucp_* tools); for the standard flow use create_cart instead. Do not mix the two flows on the same purchase. Checkout guide: read the MCP resource trusteed://guides/checkout.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
metaNoUCP request metadata. meta['ucp-agent'].profile = URL of the platform profile; it must be an https URL without credentials (at most 2048 characters).
labelNoOptional label for additional identifiers (e.g. external order ref, multi-PSP reference)
intentNoIntent context for relevance and personalization
currencyYesISO 4217 currency code (e.g. USD)
agent_keyNoSandbox credential from `create_sandbox_key`. Use this when your client cannot set an `Authorization: Bearer` header.
line_itemsYesLine items for the checkout
idempotency_keyNoREQUIRED for this write unless sent as the `Idempotency-Key` header or `params._meta["trusteed/idempotency-key"]`. 1-128 chars from [A-Za-z0-9._:/-]. Reuse the same value when retrying the same operation.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
labelNo
intentNo
statusYes
totalsYes
currencyYes
next_stepNoNext-action code, not a tool name: provide_shipping_destination, refresh_shipping_rates, choose_shipping_option, ask_user_payment_method.
created_atYes
expires_atNoISO-8601 UTC instant at which this checkout SESSION stops being usable. It is not a stock reservation and not a price guarantee.
extensionsNo`warnings[]` with `code`, `message`, `severity`.
line_itemsYes
updated_atYes
fulfillmentNo
next_actionNoOnly when a person must approve or pay: `url`, `kind`, `retry`.
approval_urlNo
idempotency_keyNo
payment_optionsNoWhen present, ask the person which option they want; never choose for them.
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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / idempotency_key / description
      Previous value: -"Required by the checkout bucket (UUID-v4 or bounded ASCII token). Choose one per purchase attempt and reuse it to retry safely. Alternatively send it as the Idempotency-Key header or params._meta[\"trusteed/idempotency-key\"]."New value: +"REQUIRED for this write unless sent as the `Idempotency-Key` header or `params._meta[\"trusteed/idempotency-key\"]`. 1-128 chars from [A-Za-z0-9._:/-]. Reuse the same value when retrying the same operation."
    • addedInput schema / properties / idempotency_key / maxLength
      Added value: +128
    • addedInput schema / properties / idempotency_key / pattern
      Added value: +"^[A-Za-z0-9._:/-]{1,128}$"
    • addedOutput schema / properties / next_step / description
      Added value: +"Next-action code, not a tool name: provide_shipping_destination, refresh_shipping_rates, choose_shipping_option, ask_user_payment_method."
  2. 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 readOnlyHint=false, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds useful behavioral context beyond that: the returned status is 'incomplete', this begins a multi-step ucp_* flow, and mixing with the cart flow is prohibited. It does not elaborate on auth/permission requirements or guide the retry semantics further, but the additions are meaningful.

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 core action and keeps each sentence purposeful: purpose, return status, flow routing, cross-flow warning, guide pointer. The return-status statement is marginally redundant with the existing output schema, but overall it is tight and well-ordered.

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 multi-parameter nested-object tool that already has an output schema and full schema descriptions, the description supplies the missing connective context (which flow this belongs to, that it returns an 'incomplete' session, and where to read the guide). Nothing critical is missing for correct invocation.

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%, and the schema itself carries rich parameter notes (idempotency requirements, variant_id conditions, ignored price/title fields). The description adds no per-parameter detail, so the baseline of 3 for schema-dominated documentation is appropriate.

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 ('Create a UCP checkout session from line items') and immediately distinguishes itself from the sibling standard flow by naming create_cart. An agent can differentiate it from create_cart, preview_checkout, and the other ucp_* tools without opening a schema.

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?

Explicitly says it 'Starts the UCP flow (ucp_* tools)', names the alternative ('for the standard flow use create_cart instead'), and adds a hard exclusion ('Do not mix the two flows on the same purchase'). When-to-use, when-not-to, and the sibling alternative are all present.

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