Добавление в корзину
grocery_add_to_cartAdd grocery items to your cart. When an item count exceeds available stock, the cart is rejected; lower the count and try again.
Instructions
Добавить товары в корзину. items = JSON [{id, count}, ...]. app_id/point_id — из grocery_stores() (обязательны). Запомни их — тот же магазин нужен для grocery_cart и grocery_checkout.
Строку, у которой итоговое количество выше остатка (countAvailable), тул отклоняет с CART_QUANTITY_CONFLICT и НЕ пишет корзину — количество сам не уменьшает. Реши расхождение (меньше или замена) и повтори.
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": {
"items": "<items>"
},
"name": "grocery_add_to_cart"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | ||
| app_id | No | ||
| point_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |