- Get shopping cart contents
- Add item to cart
JSON
{
"type": "function",
"function": {
"name": "get_user_cart",
"description": "Retrieves the user's shopping cart contents including items, quantities, and prices.",
"strict": true,
"parameters": {
"type": "object",
"properties": {},
"required": [],
"additionalProperties": false
}
}
}
JSON
{
"type": "function",
"function": {
"name": "add_to_cart",
"description": "Adds a product to the user's shopping cart. Use this when the user wants to purchase an item.",
"strict": true,
"parameters": {
"type": "object",
"properties": {
"productId": {
"type": "string",
"description": "The Algolia objectID of the product to add"
},
"quantity": {
"type": ["integer", "null"],
"description": "Number of items to add (defaults to 1 if not specified)",
"minimum": 1,
"maximum": 99
}
},
"required": ["productId", "quantity"],
"additionalProperties": false
}
}
}
