Add to Angeo Demo Store cart
add_to_cartAdd a product to an existing guest cart by SKU, using the sku field from search_products or get_product.
USE THIS when the user wants to buy something or add it to their cart. For configurable products (clothing with sizes and colours), first call get_product to see the variants, then add the specific variant SKU the user chose — if they have not chosen yet, ask which size and colour before calling this. Alternatively pass the parent SKU plus an "options" map such as {"size": "M", "color": "Blue"}; if the selection is incomplete the error lists every required attribute and its available values, so you can correct it in one more call.
Grouped products cannot be added as a single unit — the error lists their component SKUs to add individually. Bundle and downloadable products are not supported.
Returns the updated cart with line items and totals. Fails with a clear message if the SKU does not exist, is out of stock, or if adding it would exceed the store's order limits. Applies to Angeo Demo Store only.
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": {
"cart_id": "<cart_id>",
"sku": "<sku>"
},
"name": "add_to_cart"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| qty | No | Quantity to add. Defaults to 1. | |
| sku | Yes | Exact product SKU from search_products / get_product results. For configurable products this may be either the specific variant SKU or the parent SKU (then "options" is required). | |
| cart_id | Yes | Cart ID returned by create_cart. | |
| options | No | For configurable parent SKUs only: map of attribute code to the desired option label or option id, e.g. {"size": "M", "color": "Blue"}. Ignored for other product types. |