Skip to main content
Sets the quantity of a product already in the cart at a linked merchant. Setting it to 0 removes the item.
Not advertised in tools/list by default — the buy tool covers this conversationally. Expert integrations can still call it by name.

Parameters

ParameterTypeRequiredDescription
merchantstringYesMerchant slug (for example goodeggs)
product_idstringYesId of the product to update
quantitynumberYesNew quantity; 0 removes the item

Returns

The updated cart: each item with its quantity and price, the subtotal, and the total including fees, tax, and delivery when it differs. An empty cart returns “Cart is empty.” Failures return a short error message.

Example

{ "name": "buy_set_item_quantity", "arguments": { "merchant": "goodeggs", "product_id": "prod_abc123", "quantity": 2 } }