Skip to main content
Glama

Create a cart

create_cart

Start the open UCP purchase flow, no auth needed. Creates a cart session and returns a cart_id (24-hour TTL). Optionally seed with pre-configured blind items and customer details. Next step: update_cart to add items, then create_checkout → complete_checkout to mint the payment link. Duo Roller: colour is one blockout and one sheer written "Blockout + Sheer" (get_product returns duo_fabrics).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "create_cart"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemsNoOptional configured items; all submitted prices are ignored
customerNoCustomer details: real name, email and South African mobile number, plus delivery address and city. Placeholder details are refused at checkout

Output Schema

NameRequiredDescriptionDefault
itemsYes
cart_idYes
currencyYes
customerYes
total_zarYes
created_atYes
expires_atYes
item_countYes
updated_atYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / items / items / properties / operation
      Added value: +{
      +  "description": "Coulisse honeycomb only (honeycomb-blockout-coulisse, honeycomb-light-filtering-coulisse): 'tdbu' = top-down/bottom-up, up to 1300 mm wide, its own price; 'cord' (default) = cord lock, up to 3000 mm wide.",
      +  "enum": [
      +    "cord",
      +    "tdbu"
      +  ],
      +  "type": "string"
      +}
  2. Changed3 schema fields changed
    • addedInput schema / properties / customer / description
      Added value: +"Customer details: real name, email and South African mobile number, plus delivery address and city. Placeholder details are refused at checkout"
    • addedInput schema / properties / customer / properties / address / description
      Added value: +"Street delivery address. A real address is required before payment"
    • addedInput schema / properties / customer / properties / city / description
      Added value: +"Delivery town or city, for example Knysna or Johannesburg"
  3. Changed1 schema field changed
    • changedInput schema / properties / items / items / properties / mount_type / description
      Previous value: -"Use inside for inside mount or outside for face fix"New value: +"Use inside for inside mount or outside for outside mount"
  4. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false, openWorldHint=false), the description adds several non-obvious traits: no auth is required, the returned cart_id expires after 24 hours, submitted prices are ignored and recalculated server-side, and placeholder customer details are refused at checkout. These are behavioral facts an agent could not infer from the structured fields and they materially affect correct usage.

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?

Four sentences, front-loaded with the core action and return value, followed by workflow routing and one domain caveat. Every sentence carries information, though the trailing Duo Roller note reads as an appendage and slightly interrupts the otherwise clean action → next-step sequence.

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?

An output schema exists, so return values need no prose beyond the cart_id and TTL already mentioned. Given zero required parameters, nested item/customer objects, and a mutation that gates the whole checkout chain, the description covers auth, lifetime, price handling, and validation consequences (placeholders refused) — everything needed to invoke it correctly.

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 schema already carries the per-field semantics and the baseline would be 3. The description nevertheless adds meaning on top: both top-level parameters are optional (seed-only usage), items must be pre-configured, and there is a domain rule for Duo Roller colours ('Blockout + Sheer', verifiable via get_product) that is not 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 uses a specific verb and resource — 'Creates a cart session and returns a cart_id (24-hour TTL)' — and frames it as the entry point to the purchase flow, which separates it from update_cart, create_checkout and the read-side get_cart. An agent can identify what this tool produces without opening the schema.

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 states the position in the workflow explicitly and names the follow-on tools in order ('update_cart to add items, then create_checkout → complete_checkout'), which is exactly the routing an agent needs. It stops short of saying when not to create a cart (e.g. quoting via create_quote_link instead), so it is clear context rather than full when/when-not guidance.

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