Skip to main content
Glama

preview_checkout

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

SKYFIRE TOKEN (optional): Pass a kya or kya-pay token in the skyfire-pay-id header to boost trust score. No token required — request proceeds normally if omitted. PAYMENT MANDATE: this tool also requires one. Send it as the payment_mandate argument if your client cannot set headers, or as an X-Payment-Mandate header. It must carry mandate_id, max_amount_cents, currency, exp, sub, aud, and its currency must match the cart's currency or the call is denied outright. The cap in max_amount_cents is enforced against the cart total. 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`, `currency`, `exp`, `sub`, `aud`. Its `currency` must match the cart's. Use this when your client cannot set an `X-Payment-Mandate` header.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYes
statusYes
currencyYes
store_nameYes
total_centsYes
discount_centsYes
shipping_centsYes
shipping_titleNo
subtotal_centsYes
checkout_session_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / agent_key
      Added value: +{
      +  "description": "Sandbox credential from `create_sandbox_key`. Use this when your client cannot set an `Authorization: Bearer` header.",
      +  "type": "string"
      +}
    • addedInput schema / properties / payment_mandate
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": {},
      +      "type": "object"
      +    },
      +    {
      +      "type": "string"
      +    }
      +  ],
      +  "description": "Payment mandate with `mandate_id`, `max_amount_cents`, `currency`, `exp`, `sub`, `aud`. Its `currency` must match the cart's. Use this when your client cannot set an `X-Payment-Mandate` header."
      +}
  2. Changed3 schema fields changed
    • changedInput schema / additionalProperties
      Previous value: -falseNew value: +true
    • changedOutput schema / additionalProperties
      Previous value: -falseNew value: +true
    • changedOutput schema / properties / items / items / additionalProperties
      Previous value: -falseNew value: +true
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "checkout_session_id": {
      +      "type": "string"
      +    },
      +    "currency": {
      +      "type": "string"
      +    },
      +    "discount_cents": {
      +      "type": "number"
      +    },
      +    "items": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "line_price": {
      +            "type": "number"
      +          },
      +          "name": {
      +            "type": "string"
      +          },
      +          "quantity": {
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "name",
      +          "quantity",
      +          "line_price"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "shipping_cents": {
      +      "type": "number"
      +    },
      +    "shipping_title": {
      +      "type": "string"
      +    },
      +    "status": {
      +      "const": "READY_FOR_PAYMENT",
      +      "type": "string"
      +    },
      +    "store_name": {
      +      "type": "string"
      +    },
      +    "subtotal_cents": {
      +      "type": "number"
      +    },
      +    "total_cents": {
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "checkout_session_id",
      +    "store_name",
      +    "items",
      +    "subtotal_cents",
      +    "shipping_cents",
      +    "discount_cents",
      +    "total_cents",
      +    "currency",
      +    "status"
      +  ],
      +  "type": "object"
      +}
  4. Changed4 schema fields changed
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties
      Added value: +{
      +  "cart_id": {
      +    "description": "Cart session ID returned by create_cart",
      +    "type": "string"
      +  }
      +}
    • addedInput schema / required
      Added value: +[
      +  "cart_id"
      +]
  5. Changed5 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties
      Removed value: -{
      -  "cart_id": {
      -    "description": "Cart session ID returned by create_cart",
      -    "type": "string"
      -  }
      -}
    • removedInput schema / required
      Removed value: -[
      -  "cart_id"
      -]
    • changedOutput schema / (root)
      Previous value: -{
      -  "$schema": "http://json-schema.org/draft-07/schema#",
      -  "additionalProperties": false,
      -  "properties": {
      -    "checkout_session_id": {
      -      "type": "string"
      -    },
      -    "currency": {
      -      "type": "string"
      -    },
      -    "discount_cents": {
      -      "type": "number"
      -    },
      -    "items": {
      -      "items": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "line_price": {
      -            "type": "number"
      -          },
      -          "name": {
      -            "type": "string"
      -          },
      -          "quantity": {
      -            "type": "number"
      -          }
      -        },
      -        "required": [
      -          "name",
      -          "quantity",
      -          "line_price"
      -        ],
      -        "type": "object"
      -      },
      -      "type": "array"
      -    },
      -    "shipping_cents": {
      -      "type": "number"
      -    },
      -    "shipping_title": {
      -      "type": "string"
      -    },
      -    "status": {
      -      "const": "READY_FOR_PAYMENT",
      -      "type": "string"
      -    },
      -    "store_name": {
      -      "type": "string"
      -    },
      -    "subtotal_cents": {
      -      "type": "number"
      -    },
      -    "total_cents": {
      -      "type": "number"
      -    }
      -  },
      -  "required": [
      -    "checkout_session_id",
      -    "store_name",
      -    "items",
      -    "subtotal_cents",
      -    "shipping_cents",
      -    "discount_cents",
      -    "total_cents",
      -    "currency",
      -    "status"
      -  ],
      -  "type": "object"
      -}New value: +null
  6. First observed

TDQS

A4.6/5.0
Behavior5/5

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

The description discloses important state-changing behavior beyond the annotations: it advances the session state, requires a payment mandate, and denies the call outright if the mandate currency does not match the cart's currency. It also clarifies the optional token behavior ('request proceeds normally if omitted') and that there is no human login. This goes well beyond the sparse annotation hints.

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 front-loaded with the core purpose and then uses clear uppercase section labels for token, mandate, and credential requirements. It is long, but the length is justified by the complex authentication and mandate rules. Minor redundancy exists in repeating the 'if your client cannot set headers' condition for both payment_mandate and agent_key.

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?

For a tool with this many auth-related conditions, the description covers everything needed: purpose, state transition, optional token, mandatory mandate fields, currency rule, credential acquisition via create_sandbox_key, header alternatives, and the absence of human login. An output schema exists, so return-value details do not need to be in the description. The tool is fully callable from the description alone.

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%, so the baseline is 3. The description adds meaningful semantics for payment_mandate and agent_key, including required subfields, header alternatives, currency-matching enforcement, and the max_amount_cents cap. It adds less for cart_id, but that parameter is already simple and well described in the schema.

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 opens with a specific verb and resource: 'Preview the complete order summary before payment.' It also states the key side effect, 'Advances the session to ready-for-payment state,' which clearly separates it from siblings like complete_checkout and ucp_create_checkout. This is a clear, distinct purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear contextual sequencing: this is for previewing before payment and advancing to ready-for-payment, which implies use before complete_checkout. It also provides explicit prerequisite guidance such as 'Call the create_sandbox_key tool first.' However, it does not explicitly name alternatives or state when not to use the tool.

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