set_cart_quantity
Set a cart line's quantity (the server cart is the checkout source of truth, so this updates it live). Requires the item_id from the cart contents and the new absolute quantity. A quantity of 0 removes the line. Returns the updated cart card.
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": {
"site_id": "<site_id>",
"cart_id": "<cart_id>",
"item_id": "<item_id>",
"quantity": "<quantity>"
},
"name": "set_cart_quantity"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cart_id | Yes | Cart ID | |
| item_id | Yes | Line item ID from the cart (cart.items[].item_id) | |
| site_id | Yes | Registered site ID | |
| quantity | Yes | New absolute quantity for the line (>= 0; 0 removes the line) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| items | Yes | ||
| total | Yes | ||
| cartId | Yes | ||
| siteId | Yes | ||
| subtotal | Yes | ||
| discounts | No |