create_cart
Create a shopping cart in Demo Store. Returns a cart_id for use with get_shipping_rates, preview_checkout, and complete_checkout.
SKYFIRE TOKEN (optional): Provide a kya or kya-pay Skyfire token in the skyfire-pay-id request header to boost your agent trust score (up to +0.35), which may unlock better pricing or priority service. No token required — request proceeds with neutral trust score (0.50) if omitted or invalid. PAYMENT MANDATE: this tool also requires one, sent as an X-Payment-Mandate header. This tool does not accept extra arguments, so the header is the only channel here. 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
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | Items to add to cart | |
| agent_token | No | JWS compact (EdDSA/Ed25519) signed by the agent. Required for Shopify enforcement rules R001/R002/R004. The token is embedded as a server-authoritative cart attribute — Trusteed does NOT verify the signature here; that is done offline by the Shopify Function WASM. | |
| display_context | No | Agent display capability: webview (browser) or headless | headless |
| agent_session_id | No | Opaque agent session identifier for cart resume across sessions |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | ||
| status | Yes | ||
| cart_id | Yes | ||
| currency | Yes | ||
| store_name | Yes | ||
| session_state | Yes | ||
| subtotal_cents | Yes | ||
| display_context | Yes | ||
| agent_session_id | Yes |