Add or remove a favourite
set_favoriteAdd a catalog food to favorites or remove it with favorite false. Use food_id and food_type from food searches; safe to repeat.
Instructions
Add a catalog food to the user's favourites, or remove it with favorite false. food_id and food_type come from search_food, get_recent_foods or get_favorite_foods. Repeating it is safe. The server applies it asynchronously, so get_favorite_foods may not show the change for a moment. data.ok says the server accepted it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| food_id | Yes | food_id of a search_food, search_recipes, find_by_barcode, get_recent_foods, get_favorite_foods or get_my_foods hit, create_food's food_id (PRODUCT), create_recipe's recipe_id (RECIPE), or a get_day row's product_id (PRODUCT) or recipe_id (RECIPE). | |
| favorite | No | false to remove it from the favourites. | |
| food_type | Yes | type of that search hit, or the get_day row's food_type. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| data | No | ||
| error | No | describe_error() of what went wrong; docs/AGENTS.md, Results and errors. |