> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentcard.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# buy_set_item_quantity

> Change the quantity of a cart item, 0 removes it

Sets the quantity of a product already in the cart at a linked merchant. Setting it to 0 removes the item.

<Note>Not advertised in `tools/list` by default — the [buy](/companies/mcp/tools/buy) tool covers this conversationally. Expert integrations can still call it by name.</Note>

## Parameters

| Parameter    | Type   | Required | Description                            |
| ------------ | ------ | -------- | -------------------------------------- |
| `merchant`   | string | Yes      | Merchant slug (for example `goodeggs`) |
| `product_id` | string | Yes      | Id of the product to update            |
| `quantity`   | number | Yes      | New 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

```json theme={null}
{ "name": "buy_set_item_quantity", "arguments": { "merchant": "goodeggs", "product_id": "prod_abc123", "quantity": 2 } }
```
