add_recipe
Create a recipe in Cronometer from existing foods by combining food IDs and gram weights. Full nutrition is calculated automatically, and the returned recipe ID can be logged directly.
Instructions
Create a recipe in Cronometer from other foods in the database.
Unlike add_custom_food, which takes hand-entered nutrition, a recipe references existing foods by ID and Cronometer derives the full nutrient profile (including micronutrients) from those ingredients.
Use search_foods to find each ingredient's food_id. After creation, use the returned food_id with add_food_entry to log it.
Args: name: Recipe name. ingredients: List of {"food_id": int, "grams": float} objects, one per ingredient. An optional "measure_id" overrides the unit shown in Cronometer's UI; "grams" always drives the nutrition math. serving_name: Name of the default serving measure (default "Serving"). serving_grams: Grams in one serving. Defaults to the full batch weight (one serving = the whole recipe). comments: Free-text recipe notes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| comments | No | ||
| ingredients | Yes | ||
| serving_name | No | Serving | |
| serving_grams | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |