Set cart quantity
set_cart_quantitySet the quantity of one confirmed variant in the cart. Zero removes it. Returns the changed items and subtotal.
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": {
"variant_id": "<variant_id>",
"quantity": "<quantity>"
},
"name": "set_cart_quantity"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cart_key | No | Guest carts only; omit it when the account is connected. Private tool input. Copy the key from an earlier tool result, the cart_key query parameter of a payment link, or the last segment of a /shop/mcp-checkout/ link already in the chat. Keep it out of shopper replies. | |
| quantity | Yes | ||
| variant_id | Yes |