Calculate the nutrients of a meal
calc_mealSums nutrients for a meal from TACO food IDs using grams or household measures, and reports totals with lower bounds when nutrient data is missing.
Instructions
Sum nutrients over a list of TACO foods (ids from search_food). Each item has either grams or a household_measure with quantity (e.g. "colher de sopa" x 2, covered foods only; see convert_household_measure). Totals are lower bounds when an item has no data for a nutrient: the response says which. Defaults to energy, protein, fat, carbohydrate, fiber and sodium.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | Foods in the meal. The same food may appear more than once. | |
| nutrients | No | Nutrient keys to total. Omit for energy, protein, fat, carbohydrate, fiber and sodium. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | The meal items in the order received. | |
| notes | Yes | Caveats about this answer. | |
| source | Yes | Citation for the data. | |
| totals | Yes | One entry per requested nutrient, in table order. | |
| complete | Yes | True when every requested nutrient has data for every item (no total is a lower bound). | |
| total_grams | Yes | Sum of the item quantities. | |
| household_source | No | Citation for the household measure weights; set when any item used one. |