composite_foods
ChatGPTUse this when the person asks for the nutrition of a recipe, meal, smoothie, or plate made of several foods in given amounts. Returns total nutrients at the amounts given, for every field at the level of detail (basic, standard, or complete) that every ingredient has; fields some ingredient lacks are listed as notYetResearched with the ingredients that lack them, never counted as zero. Each nutrient is summed over the edible masses given, with no cooking or retention changes; bounds are sums of each value's low and high (or its amount when it has none) at the ingredient's low and high grams, which differ only when its portion weight is an estimate; they are not confidence intervals. A total that sums an estimated value (or one the server derived from an estimate), or an ingredient weighed by an estimated portion, names those ingredients in estimates; warnings pass on ingredients' source disagreements about the totalled fields. Nothing is stored, and no personal meal is saved. Shows the person nothing; to show them a card, call show_nutrition_card instead.
get_food_nutrients
ChatGPTUse this when the person asks how much of a nutrient (calories, protein, vitamins…) is in a food or serving, or wants its nutrition facts. Gives the nutrients of each food asked for, several per call, at its quantity and level of detail (basic, standard, or complete), and lists the fields not yet researched instead of guessing them. Shows the person nothing; to show them a card, call show_nutrition_card instead.
search_foods
ChatGPTUse this when you need to find foods in the nutrition database. This tool finds foods by name or other name, tolerating plurals and typos, and returns each one's id and name. Takes many queries at once. Once you have the ids, use get_food_nutrients to fetch their details.
set_food_nutrients
ChatGPTUse this when you have researched a new food that you didn't find in the database, or you have researched nutrient values a food lacks (its notYetResearched fields from get_food_nutrients) or better ones. To extend or correct a food, send the food id (or null if this is a new food) and only the new or corrected values. Only upload foods, not recipes. Saves publicly; a repeated call adds a revision. Never include personal information. Research each value on its own; never fill a batch of fields with one default. Send only the fields you researched; a food may stay partial. 1. Name each field as get_food_nutrients lists it in notYetResearched, e.g. "Protein", and give its amount in the unit listed with it; for a new food, call get_food_nutrients with its name and detail "complete" to list every field. Values are per 100 g edible food, in that unit. 2. reported: read from a source for this exact food (species, variety, ripeness, part, preparation): food composition tables (USDA FoodData Central SR Legacy or Survey, UK CoFID, French CIQUAL, AUSNUT, Canadian Nutrient File), labels, or peer-reviewed analyses. Check the column heading, units, and basis before converting; scaling a label serving to 100 g is still reported. Cite its source indexes. 3. imputed: any value you estimated or calculated yourself, from the closest comparable foods or a relationship to values the food already has (a fatty acid as a share of total fat, an amino acid as a share of protein). Give a method, inputs naming the foods, ratios, and assumptions, and an uncertainty {low, high} that contains the amount and reflects the real spread, not a token range. Bounds are descriptive, not confidence intervals. 4. Use zero only with evidence the component is absent from this food, with bounds like any estimate. Fields marked usuallyAbsent are absent from most foods but never assumed: for each one this food cannot contain, report zero as an imputed value that says why; leave the rest for research (tea, citrus, soy, mushrooms, wine, chocolate, fortified products...). 5. Leave fields marked serverDerives to the server; only the server marks values derived. Components may not exceed their totals, alternative methods for one quantity must broadly agree, and energy must fit the protein, fat, carbohydrate, alcohol, and acetic acid. Totals overlap their components, and neither total fat nor protein is the sum of its listed components. 6. Add every source you actually read to sources, and cite the indexes each value rests on. 7. Attribute every estimate with imputation {model, provider, service, generatedAt, reasoningEffort?}, once for the whole write: your model name as you know it, with its version if known (for example GPT-6 or claude-fable-5-1), the company serving you, the product or API you run in, and the time. Add reasoningEffort only if your host tells you. Never invent any of them. 8. If a quantity you need is a volume or household measure the food lacks (a cup, a tablespoon, a slice), add it to portions with its weight in grams: reported if a source states it, otherwise imputed, with bounds in grams, as in rules 3 and 7. One volume portion converts every volume unit. Give its form when the weight depends on it (sifted, packed, chopped, mashed); cooked or raw is a different food, not a form.
show_nutrition_card
ChatGPTUse this when the person would be better served by seeing nutrition than by reading your summary of it: when they ask to see nutrition facts, a label, or a side-by-side of foods. Shows them a card of each food's nutrients, or of a recipe or meal's totals, with each amount and its percent Daily Value, marking totals that rest on estimates, and returns the same data get_food_nutrients or composite_foods would. Call it instead of those tools, not after them.