Create a private recipe
create_recipeSave a private recipe from catalog products, so you can log it as one food.
Instructions
Save a private recipe in the user's own foods from catalog products, e.g. their usual smoothie, so it can be logged as one food. Only the user sees it; it never goes to the shared catalog. Each ingredient takes food_id, quantity and unit or measure_id as add_food does, is a PRODUCT, and is checked the same way before anything is written: when one is wrong, nothing is created and the error names it as ingredients[index]. Returns recipe_id and per_serving, its portion measure as get_food_measures lists it (weight_g, energy_kcal, protein_g, fat_g, carbohydrate_g of one serving; null when the recipe could not be read back). Log it with add_food: food_id recipe_id, food_type RECIPE, quantity the servings eaten. Each call creates another recipe: when one fails with anything but a validation, not_found or rate_limit error, look for it with get_my_foods before creating it again.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The recipe's name, e.g. 'Owsianka z bananem'. | |
| servings | No | How many servings the ingredients make. | |
| description | No | How to make it, as the app shows it. | |
| ingredients | Yes | The products in it, each as add_food takes it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| data | No | ||
| error | No | describe_error() of what went wrong; docs/AGENTS.md, Results and errors. |