Select cart coupons
set_cart_couponsSet exactly which coupons the cart should use by passing coupon IDs from list_coupons; an empty list removes all coupons and the cart is read back to confirm.
Instructions
Make exactly these coupons the cart's selection, by couponId from list_coupons; an empty list removes them all. Only when the user asks to use or stop using coupons. It submits the cart's own coupon form and confirms the result by reading the cart back. A coupon is applied at checkout, on the website. If the result has mutation.outcome "unknown", the selection may have changed: call list_coupons before any further change and never repeat the request automatically.
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": {
"couponIds": "<couponIds>"
},
"name": "set_cart_coupons"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| couponIds | Yes | Coupon IDs from list_coupons: the complete selection the cart should have. An empty array removes every selected coupon. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |