Skip to main content
Glama

create_checkout

Destructive

Phase 1 of 2 in the purchase flow. Convert a cart (or inline items + customer) into a checkout. Customer name, email, and phone are required. Returns checkout_id. No payment link is minted yet, call complete_checkout for that. Use update_checkout to correct customer details before finalising.

Input Schema

NameRequiredDescriptionDefault
itemsNoLine items to buy. Required if cart_id is not given.
cart_idNoEither cart_id or items required
customerNoCustomer details. Name, email, mobile phone and delivery address are required; city is optional. Placeholder or test details are refused.
payment_methodNoDefault 'yoco'

Output Schema

NameRequiredDescriptionDefault
ap2No
itemsNo
statusYes
messageNo
currencyYes
customerNo
next_stepNo
total_zarYes
item_countNo
checkout_idYes
payment_urlNo
payment_methodNo
provider_referenceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / customer / description
      Added value: +"Customer details. Name, email, mobile phone and delivery address are required; city is optional. Placeholder or test details are refused."
    • addedInput schema / properties / items / description
      Added value: +"Line items to buy. Required if cart_id is not given."
  2. Changed3 schema fields changed
    • removedOutput schema / properties / created_at
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ]
      -}
    • changedOutput schema / properties / items / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "additionalProperties": true,
      -      "properties": {
      -        "colour": {
      -          "type": "string"
      -        },
      -        "finish": {
      -          "anyOf": [
      -            {
      -              "type": "string"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ]
      -        },
      -        "height": {
      -          "type": "number"
      -        },
      -        "mountType": {
      -          "type": "string"
      -        },
      -        "price": {
      -          "type": "number"
      -        },
      -        "productId": {
      -          "type": "string"
      -        },
      -        "productName": {
      -          "type": "string"
      -        },
      -        "quantity": {
      -          "type": "number"
      -        },
      -        "total": {
      -          "type": "number"
      -        },
      -        "width": {
      -          "type": "number"
      -        }
      -      },
      -      "required": [],
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "additionalProperties": true,
      +      "properties": {
      +        "colour": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "drop_mm": {
      +          "type": "number"
      +        },
      +        "mount_type": {
      +          "type": "string"
      +        },
      +        "product_name": {
      +          "type": "string"
      +        },
      +        "product_slug": {
      +          "type": "string"
      +        },
      +        "quantity": {
      +          "type": "number"
      +        },
      +        "total_price": {
      +          "type": "number"
      +        },
      +        "unit_price": {
      +          "type": "number"
      +        },
      +        "width_mm": {
      +          "type": "number"
      +        }
      +      },
      +      "required": [],
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / payment_status
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ]
      -}
  3. Changed8 schema fields changed
    • addedInput schema / anyOf
      Added value: +[
      +  {
      +    "required": [
      +      "cart_id"
      +    ]
      +  },
      +  {
      +    "properties": {
      +      "customer": {
      +        "required": [
      +          "name",
      +          "email",
      +          "phone"
      +        ]
      +      }
      +    },
      +    "required": [
      +      "items",
      +      "customer"
      +    ]
      +  }
      +]
    • addedInput schema / properties / customer / properties / email / description
      Added value: +"Real customer email, checked before checkout creation"
    • addedInput schema / properties / customer / properties / name / description
      Added value: +"Real customer name, checked before checkout creation"
    • addedInput schema / properties / customer / properties / phone / description
      Added value: +"South African phone number, checked before checkout creation"
    • removedInput schema / properties / customer / required
      Removed value: -[
      -  "name",
      -  "email",
      -  "phone"
      -]
    • addedInput schema / properties / items / items
      Added value: +{
      +  "properties": {
      +    "colour": {
      +      "description": "Exact available colour; validate with configure_product before adding",
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "finish": {
      +      "description": "Optional pricing finish for aluminium Venetians",
      +      "type": "string"
      +    },
      +    "height_mm": {
      +      "description": "Actual ordered drop in millimetres",
      +      "exclusiveMinimum": 0,
      +      "type": "number"
      +    },
      +    "mount_type": {
      +      "description": "Use inside for recess fit or outside for face fix",
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "product_id": {
      +      "description": "product_id returned by search_catalog or lookup_catalog",
      +      "type": "string"
      +    },
      +    "product_name": {
      +      "description": "Optional; server resolves the catalogue name",
      +      "type": "string"
      +    },
      +    "quantity": {
      +      "description": "Number of blinds; defaults to 1",
      +      "type": "number"
      +    },
      +    "total_price_zar": {
      +      "description": "Optional, ignored: server recalculates all totals",
      +      "type": "number"
      +    },
      +    "unit_price_zar": {
      +      "description": "Optional, ignored: server recalculates all prices",
      +      "type": "number"
      +    },
      +    "width_mm": {
      +      "description": "Actual ordered width in millimetres",
      +      "exclusiveMinimum": 0,
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "product_id",
      +    "width_mm",
      +    "height_mm",
      +    "colour",
      +    "mount_type"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / properties / items / minItems
      Added value: +1
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "ap2": {
      +      "additionalProperties": true,
      +      "properties": {
      +        "merchant_authorization": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "merchant_authorization"
      +      ],
      +      "type": "object"
      +    },
      +    "checkout_id": {
      +      "type": "string"
      +    },
      +    "created_at": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "currency": {
      +      "const": "ZAR",
      +      "type": "string"
      +    },
      +    "customer": {
      +      "additionalProperties": true,
      +      "properties": {
      +        "address": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "city": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "email": {
      +          "type": "string"
      +        },
      +        "name": {
      +          "type": "string"
      +        },
      +        "phone": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        }
      +      },
      +      "required": [],
      +      "type": "object"
      +    },
      +    "item_count": {
      +      "type": "number"
      +    },
      +    "items": {
      +      "anyOf": [
      +        {
      +          "items": {
      +            "additionalProperties": true,
      +            "properties": {
      +              "colour": {
      +                "type": "string"
      +              },
      +              "finish": {
      +                "anyOf": [
      +                  {
      +                    "type": "string"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ]
      +              },
      +              "height": {
      +                "type": "number"
      +              },
      +              "mountType": {
      +                "type": "string"
      +              },
      +              "price": {
      +                "type": "number"
      +              },
      +              "productId": {
      +                "type": "string"
      +              },
      +              "productName": {
      +                "type": "string"
      +              },
      +              "quantity": {
      +                "type": "number"
      +              },
      +              "total": {
      +                "type": "number"
      +              },
      +              "width": {
      +                "type": "number"
      +              }
      +            },
      +            "required": [],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "message": {
      +      "type": "string"
      +    },
      +    "next_step": {
      +      "type": "string"
      +    },
      +    "payment_method": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "payment_status": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "payment_url": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "provider_reference": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "status": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "total_zar": {
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "checkout_id",
      +    "status",
      +    "total_zar",
      +    "currency"
      +  ],
      +  "type": "object"
      +}
  4. First observed

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and destructiveHint=true, so the mutation signal is covered. The description adds genuinely useful context beyond that — no payment link is minted at this stage — but is silent on side effects an agent would want to know: whether stock is reserved or held, whether the checkout expires, and whether cancel_checkout is the recovery path for a mistake.

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-loaded with the phase and the core action, and each sentence carries routing or prerequisite information. Minor redundancy in restating the required customer fields, which the schema already marks required.

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?

An output schema exists and checkout_id is named anyway; the two-step flow and the correction path are covered. For a tool this complex (nested items, server-side repricing), missing notes on stock reservation and checkout lifetime keep it short of full completeness.

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 the nested items/customer schemas are richly documented, so the baseline applies. The only added semantics — that name, email and phone are required — restates constraints the schema already encodes, and the cart_id-vs-items exclusivity is not clarified further than the schema's anyOf.

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 ("Convert a cart ... into a checkout") and pins its position in the flow as "Phase 1 of 2 in the purchase flow". It also explicitly distinguishes itself from complete_checkout (payment link) and update_checkout (correcting details), so an agent can place it without opening 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?

Names the alternatives and the conditions that select them: call complete_checkout to mint the payment link, call update_checkout to fix customer details before finalising. The prerequisite (customer name/email/phone required) is also stated, leaving little to inference.

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.