add_cart_item
Add units of a product to one of your carts. Pass variant_id when the product has combinations (see get_product). Stock is re-validated on every call; the answer is the cart read back after the add.
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_id": "<cart_id>",
"product_id": "<product_id>",
"quantity": "<quantity>"
},
"name": "add_cart_item"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cart_id | Yes | The cart handle, from `create_cart`. | |
| quantity | Yes | Units to add (1 to 999999). | |
| product_id | Yes | The product id, from a search or list result. | |
| variant_id | No | The combination to add; required when the product has combinations, omitted for a plain product. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lines | Yes | The cart's lines, in cart order. | |
| cart_id | Yes | The cart handle. | |
| total_yen | Yes | Grand total in yen: subtotal plus shipping. | |
| item_count | Yes | Total units across all lines. | |
| shipping_yen | Yes | Shipping fee in yen (free at the store's threshold). | |
| subtotal_yen | Yes | Sum of purchasable line totals, in yen. |