Set cart quantity
cart_set_quantityUpdates the quantity of a specific cart line; set it to 0 to remove that item from the cart.
Instructions
Set the quantity of one cart line (0 removes it). 修改购物车某一行的数量,0 表示删除;lineKey 来自 cart_view。
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": {
"lineKey": "<lineKey>",
"quantity": "<quantity>"
},
"name": "cart_set_quantity"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lineKey | Yes | cart_view 返回的 lineKey(也可以用 linkId) | |
| quantity | Yes |