Add item to sandbox cart
add_to_cartAdd a product to a cart. Omit cart_id to create a new cart; reuse the returned cart_id on later calls. Carts expire 24 hours after the last change. Products with variants need variant_id.
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": {
"product_id": "<product_id>"
},
"name": "add_to_cart"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cart_id | No | ||
| quantity | No | ||
| product_id | Yes | ||
| variant_id | No |