Skip to main content
Glama

ucp_create_checkout

Idempotent

Create a UCP checkout session from line items. Returns a UCP checkout object with status 'incomplete'. 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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
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)
line_itemsYesLine items for the checkout
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
idYes
labelNo
intentNo
statusYes
totalsYes
currencyYes
created_atYes
extensionsNo
line_itemsYes
updated_atYes
idempotency_keyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • 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. Changed10 schema fields changed
    • changedInput schema / additionalProperties
      Previous value: -falseNew value: +true
    • changedInput schema / properties / intent / additionalProperties
      Previous value: -falseNew value: +true
    • changedInput schema / properties / line_items / items / additionalProperties
      Previous value: -falseNew value: +true
    • changedOutput schema / additionalProperties
      Previous value: -falseNew value: +true
    • changedOutput schema / properties / extensions / additionalProperties
      Previous value: -falseNew value: +true
    • changedOutput schema / properties / extensions / properties / warnings / items / additionalProperties
      Previous value: -falseNew value: +true
    • changedOutput schema / properties / intent / additionalProperties
      Previous value: -falseNew value: +true
    • changedOutput schema / properties / line_items / items / additionalProperties
      Previous value: -falseNew value: +true
    • changedOutput schema / properties / line_items / items / properties / price / additionalProperties
      Previous value: -falseNew value: +true
    • changedOutput schema / properties / totals / items / additionalProperties
      Previous value: -falseNew value: +true
  3. Added
  4. Removed
  5. 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: +{
      +  "currency": {
      +    "description": "ISO 4217 currency code (e.g. USD)",
      +    "maxLength": 3,
      +    "minLength": 3,
      +    "type": "string"
      +  },
      +  "intent": {
      +    "additionalProperties": false,
      +    "description": "Intent context for relevance and personalization",
      +    "properties": {
      +      "action": {
      +        "description": "Intent action (e.g. 'purchase', 'gift', 'compare')",
      +        "type": "string"
      +      },
      +      "context": {
      +        "description": "Natural language context for personalization",
      +        "type": "string"
      +      },
      +      "locale": {
      +        "description": "ISO locale",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "action"
      +    ],
      +    "type": "object"
      +  },
      +  "label": {
      +    "description": "Optional label for additional identifiers (e.g. external order ref, multi-PSP reference)",
      +    "type": "string"
      +  },
      +  "line_items": {
      +    "description": "Line items for the checkout",
      +    "items": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "price": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "amount": {
      +              "description": "Price in smallest unit (cents)",
      +              "minimum": 0,
      +              "type": "number"
      +            },
      +            "currency": {
      +              "description": "ISO 4217 currency code",
      +              "maxLength": 3,
      +              "minLength": 3,
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "amount",
      +            "currency"
      +          ],
      +          "type": "object"
      +        },
      +        "product_id": {
      +          "description": "Product identifier",
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "quantity": {
      +          "description": "Quantity",
      +          "exclusiveMinimum": 0,
      +          "type": "integer"
      +        },
      +        "title": {
      +          "description": "Product title",
      +          "minLength": 1,
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "product_id",
      +        "title",
      +        "quantity",
      +        "price"
      +      ],
      +      "type": "object"
      +    },
      +    "minItems": 1,
      +    "type": "array"
      +  }
      +}
    • addedInput schema / required
      Added value: +[
      +  "currency",
      +  "line_items"
      +]
  6. 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: -{
      -  "currency": {
      -    "description": "ISO 4217 currency code (e.g. USD)",
      -    "maxLength": 3,
      -    "minLength": 3,
      -    "type": "string"
      -  },
      -  "intent": {
      -    "additionalProperties": false,
      -    "description": "Intent context for relevance and personalization",
      -    "properties": {
      -      "action": {
      -        "description": "Intent action (e.g. 'purchase', 'gift', 'compare')",
      -        "type": "string"
      -      },
      -      "context": {
      -        "description": "Natural language context for personalization",
      -        "type": "string"
      -      },
      -      "locale": {
      -        "description": "ISO locale",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "action"
      -    ],
      -    "type": "object"
      -  },
      -  "label": {
      -    "description": "Optional label for additional identifiers (e.g. external order ref, multi-PSP reference)",
      -    "type": "string"
      -  },
      -  "line_items": {
      -    "description": "Line items for the checkout",
      -    "items": {
      -      "additionalProperties": false,
      -      "properties": {
      -        "price": {
      -          "additionalProperties": false,
      -          "properties": {
      -            "amount": {
      -              "description": "Price in smallest unit (cents)",
      -              "minimum": 0,
      -              "type": "number"
      -            },
      -            "currency": {
      -              "description": "ISO 4217 currency code",
      -              "maxLength": 3,
      -              "minLength": 3,
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "amount",
      -            "currency"
      -          ],
      -          "type": "object"
      -        },
      -        "product_id": {
      -          "description": "Product identifier",
      -          "minLength": 1,
      -          "type": "string"
      -        },
      -        "quantity": {
      -          "description": "Quantity",
      -          "exclusiveMinimum": 0,
      -          "type": "integer"
      -        },
      -        "title": {
      -          "description": "Product title",
      -          "minLength": 1,
      -          "type": "string"
      -        }
      -      },
      -      "required": [
      -        "product_id",
      -        "title",
      -        "quantity",
      -        "price"
      -      ],
      -      "type": "object"
      -    },
      -    "minItems": 1,
      -    "type": "array"
      -  }
      -}
    • removedInput schema / required
      Removed value: -[
      -  "currency",
      -  "line_items"
      -]
    • changedOutput schema / (root)
      Previous value: -{
      -  "$schema": "http://json-schema.org/draft-07/schema#",
      -  "additionalProperties": false,
      -  "properties": {
      -    "created_at": {
      -      "type": "string"
      -    },
      -    "currency": {
      -      "type": "string"
      -    },
      -    "extensions": {
      -      "additionalProperties": false,
      -      "properties": {
      -        "warnings": {
      -          "items": {
      -            "additionalProperties": false,
      -            "properties": {
      -              "code": {
      -                "type": "string"
      -              },
      -              "disclosure_url": {
      -                "type": "string"
      -              },
      -              "message": {
      -                "type": "string"
      -              },
      -              "severity": {
      -                "enum": [
      -                  "info",
      -                  "caution",
      -                  "critical"
      -                ],
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "code",
      -              "message",
      -              "severity"
      -            ],
      -            "type": "object"
      -          },
      -          "type": "array"
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "id": {
      -      "type": "string"
      -    },
      -    "idempotency_key": {
      -      "type": "string"
      -    },
      -    "intent": {
      -      "additionalProperties": false,
      -      "properties": {
      -        "action": {
      -          "type": "string"
      -        },
      -        "context": {
      -          "type": "string"
      -        },
      -        "locale": {
      -          "type": "string"
      -        }
      -      },
      -      "required": [
      -        "action"
      -      ],
      -      "type": "object"
      -    },
      -    "label": {
      -      "type": "string"
      -    },
      -    "line_items": {
      -      "items": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "id": {
      -            "type": "string"
      -          },
      -          "price": {
      -            "additionalProperties": false,
      -            "properties": {
      -              "amount": {
      -                "type": "number"
      -              },
      -              "currency": {
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "amount",
      -              "currency"
      -            ],
      -            "type": "object"
      -          },
      -          "product_id": {
      -            "type": "string"
      -          },
      -          "quantity": {
      -            "type": "number"
      -          },
      -          "title": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "id",
      -          "product_id",
      -          "title",
      -          "quantity",
      -          "price"
      -        ],
      -        "type": "object"
      -      },
      -      "type": "array"
      -    },
      -    "status": {
      -      "enum": [
      -        "incomplete",
      -        "requires_escalation",
      -        "ready_for_complete",
      -        "complete_in_progress",
      -        "completed",
      -        "canceled"
      -      ],
      -      "type": "string"
      -    },
      -    "totals": {
      -      "items": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "amount": {
      -            "type": "number"
      -          },
      -          "currency": {
      -            "type": "string"
      -          },
      -          "label": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "label",
      -          "amount",
      -          "currency"
      -        ],
      -        "type": "object"
      -      },
      -      "type": "array"
      -    },
      -    "updated_at": {
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "id",
      -    "status",
      -    "currency",
      -    "line_items",
      -    "totals",
      -    "created_at",
      -    "updated_at"
      -  ],
      -  "type": "object"
      -}New value: +null
  7. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Beyond annotations, it discloses the mandatory payment mandate, the ability to send it as an argument or header, the hard denial on currency mismatch, and the max_amount cap enforcement. These are operationally critical constraints that annotations alone do not convey.

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 purpose is front-loaded and each sentence carries information. The Payment Mandate section is longer than ideal and partly overlaps schema descriptions, but it is justified because it clarifies a non-obvious required field and hard failure conditions.

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?

With an output schema present and rich field schemas, the description covers the critical missing context: return status, mandate requirements, and enforcement behavior. It is slightly vague about how 'cart total' and 'cart currency' are derived, but not enough to block correct invocation.

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%, but the description adds important meaning for payment_mandate: the required embedded fields, the header alternative, the currency-match hard stop, and cap enforcement. It does not add much to currency or line_items, but the schema already documents those fully.

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: 'Create a UCP checkout session from line items.' It also clarifies the expected return state ('status incomplete'), which distinguishes it from sibling tools like complete_checkout or preview_checkout.

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?

It gives clear context for use (creating an initial checkout from line items and supplying a payment mandate), and the 'status incomplete' detail signals this is the creation step. It does not explicitly name alternatives or exclusion conditions, but the intended usage is unambiguous.

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