Get Food Nutrition
get_food_nutritionLook up nutrition facts for one or more foods described in plain text.
Use this tool for any question about calories, macros, or nutrients for a named food or meal. Each query is a natural-language phrase describing one food item; the API identifies the food, resolves the quantity and unit, and returns a full nutrient breakdown. If the user provides a food photograph rather than a text description, use analyze_food_image instead.
Returns a list of dicts, one per query. Each dict has: food (name,
food_id, amount, unit, weight_g, ingredients), macronutrients (calories,
protein, carbs, fat, etc.), micronutrients (vitamins and minerals),
diet_flags, health_flags, and status.
Returns {"error": ..., "query": ...} for any item that cannot be identified.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| queries | Yes | One natural-language phrase per food item. Supported formats: plain name ("cheddar cheese", defaults to 100 g), quantity + unit ("1 cup rice", "200g chicken breast"), or UPC/EAN barcode ("049000042566", 8-14 digits). Keep compound food names as a single entry — "carrot cake", "chicken noodle soup", and "grilled cheese sandwich" are each one food, not multiple. Only split into separate entries when the user is clearly listing multiple distinct foods — e.g. "1 croissant and 1 egg" → ["1 croissant", "1 egg"]. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |