> ## 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_add_to_cart

> Add a product (by id from buy_search_products or the menu digest) to the cart.

Connect to `https://mcp.agentcard.sh/mcp` with the **user's connection token** (or a `buy_token` for org-owned accounts).

<Note>Not in the default `tools/list`. It is still callable by exact name, and appears when the client sends the `x-expert-tools: 1` header.</Note>

## What it does

Add a product (by id from buy\_search\_products or the menu digest) to the cart. Returns the updated cart with subtotal. For a RESTAURANT item flagged (has options), FIRST call buy\_get\_item\_options, have the user choose, and pass the chosen ids here as `options` — a required option group must be satisfied or the add is rejected with options\_required (then fetch options and re-add with selections; a persistent options\_required usually means a required NESTED sub-choice is still missing). Grocery items and no-option restaurant items need no options.

## Inputs

| Field | Type | Description |
| - | - | - |
| `merchant` *(required)* | string | |
| `product_id` *(required)* | string | |
| `quantity` | number | default 1 |
| `options` | array | restaurant items only: the chosen options from buy\_get\_item\_options |

## Returns

None.

## Example call

```json theme={null}
{
  "tool": "buy_add_to_cart",
  "arguments": {
    "merchant": "\u2026",
    "product_id": "\u2026"
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.