update_cart
Replace the current store cart contents with the supplied full line item list.
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": {
"line_items": "<line_items>"
},
"name": "update_cart"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cart_id | No | current | |
| line_items | Yes | ||
| buyer_context | No | ||
| cart_scope_id | No | ||
| source_surface | No | cart | |
| cart_session_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | cart_result | |
| empty | No | ||
| items | No | ||
| cartId | No | ||
| totals | No | ||
| message | Yes | ||
| storeId | Yes | ||
| snapshotAt | No | ||
| cartScopeId | No | ||
| cartVersion | No | ||
| continueUrl | No | ||
| emptyReason | No | ||
| snapshotMode | No | current | |
| cartSessionId | No | ||
| lineItemCount | No | ||
| cartSessionState | No | active |