Skip to main content
Glama

Quantum Atlas Universal Commerce Storefront (UCP)

Create UCP Shopping Cart

create_cart

Create a stateful UCP shopping cart with itemized USD cent totals and instant digital delivery estimates. Use this for low-commitment basket assembly; use create_checkout directly when ready to finalize purchase. Parameters: pass cart.line_items (array of { item: { id }, quantity }), optional cart.context, and optional cart.buyer. Behavior: allocates a ucart_* session valid for 2 hours, validates variant stock, and returns subtotal/total in USD cents plus continue_url.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

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

Input Schema

NameRequiredDescriptionDefault
cartYesUCP cart creation body.
metaNoUCP protocol request metadata (meta.ucp-agent and meta.idempotency-key).

Output Schema

NameRequiredDescriptionDefault
ucpYesNegotiated UCP protocol metadata and capability intersection.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Goes well beyond the annotations by disclosing that it allocates a ucart_* session valid for 2 hours, validates variant stock, and returns subtotal/total plus continue_url. The only unaddressed behavioral area is failure handling (expired session, out-of-stock variant, retry behavior when idempotentHint is false), which the schema partially covers via meta.idempotency-key.

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 purpose and routing guidance, then split into clean Parameters and Behavior lines that are scannable rather than prose-heavy. Minor padding in the opening clause ('instant digital delivery estimates'), but nothing that costs the reader meaningfully.

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 stateful create tool with an output schema and full annotation coverage, the definition supplies the missing pieces: session lifetime, stock validation, and return fields. What remains thin is error/expiry behavior and how the returned session interacts with get_cart/update_cart, but nothing critical to invoking it correctly is absent.

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%, so the schema already documents every field including line_items shape and the optional buyer/context blocks. The description's Parameters sentence largely restates that structure (required line_items, optional context and buyer) without adding syntax or constraints the schema lacks, which is the expected baseline at full coverage.

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?

Uses a specific verb and resource ('Create a stateful UCP shopping cart') and immediately scopes what it produces (itemized USD cent totals, digital delivery estimates). It also explicitly distinguishes itself from create_checkout, so an agent can route between basket assembly and purchase finalization without consulting either 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?

States both when to use it ('low-commitment basket assembly') and when not to ('use create_checkout directly when ready to finalize purchase'), naming the alternative explicitly. The condition that selects between the two tools 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