update_cart_item
Set the quantity of a cart line by variant ID, capped at available stock. Use it to adjust item counts in an existing Kaimoru cart before checkout.
Instructions
Set the quantity of one line in one of your carts, addressed by variant_id. The cart service caps the quantity at the stock on hand. Use remove_cart_item to remove a line.
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>",
"variant_id": "<variant_id>",
"quantity": "<quantity>"
},
"name": "update_cart_item"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cart_id | Yes | The cart handle, from `create_cart`. | |
| quantity | Yes | The line's new quantity (at least 1; stock-capped by the cart service). | |
| variant_id | Yes | The line's variant id. |
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. |