create_cart
Create a shopping cart in Demo Store. Returns a cart_id. Pass it as cart_id to get_shipping_rates, select_shipping_option, apply_discount and preview_checkout; complete_checkout and get_trust_receipt take the same value as checkout_session_id.
KYA IDENTITY: a Skyfire kya token has no effect on this tool (it grants no trust boost here); KYA identity applies to the REST agent API (Authorization: Bearer), not to the MCP tools. Checkout guide: read the MCP resource trusteed://guides/checkout. 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_key | No | Sandbox credential from `create_sandbox_key`. Use this when your client cannot set an `Authorization: Bearer` header. | |
| agent_token | No | JWS compact (EdDSA/Ed25519) signed by the agent. Required for Shopify enforcement rules R001/R002/R004. A malformed token fails with AGENT_TOKEN_INVALID on any platform. On Shopify stores Trusteed also verifies the signature on receipt against a registered key that must belong to the calling agent (otherwise AGENT_TOKEN_INVALID and no cart is created), and the checkout Function verifies it again offline at payment. On other platforms Trusteed checks its structure only and forwards it to the store. | |
| display_context | No | Agent display capability: webview (browser) or headless | headless |
| idempotency_key | No | REQUIRED for this write unless sent as the `Idempotency-Key` header or `params._meta["trusteed/idempotency-key"]`. 1-128 chars from [A-Za-z0-9._:/-]. Reuse the same value when retrying the same operation. | |
| 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 | ||
| next_step | Yes | ||
| expires_at | No | ISO-8601 UTC instant at which this checkout SESSION stops being usable. It is not a stock reservation and not a price guarantee. | |
| store_name | Yes | ||
| session_state | Yes | ||
| subtotal_cents | Yes | ||
| display_context | Yes | ||
| agent_session_id | Yes | ||
| expires_in_seconds | No | Whole seconds left on this checkout SESSION at response time (0 when already past). It is not a stock reservation and not a price guarantee. |