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.
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": {
"food_id": "<food_id>",
"food_type": "<food_type>"
},
"name": "set_favorite"
}
}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. |