add_food_entry
Add a food entry to your Cronometer diary by specifying food ID, source, weight in grams, and date for accurate nutrition tracking.
Instructions
Add a food entry to the Cronometer diary.
Use search_foods to find food_id and food_source_id, then get_food_details for measure_id and weight_grams.
For CRDB/custom foods, you can omit measure_id (defaults to a universal NCCDB measure that works for all food sources). When measure_id is omitted, quantity is set to weight_grams.
Args: food_id: Numeric food ID from search_foods results. food_source_id: Food source ID from search_foods results. weight_grams: Weight of the serving in grams. date: Date to log the entry as YYYY-MM-DD (e.g. "2026-03-04"). measure_id: Measure/unit ID. Pass 0 (default) to use the universal measure that works for all food sources. quantity: Number of servings. Defaults to weight_grams when measure_id is 0 (universal gram-based measure). diary_group: Diary group name (case-insensitive) or 0-based index. Names are user-configured and are not always Breakfast/Lunch/Dinner/Snacks — call list_diary_groups to see this account's groups. Defaults to a time-of-day choice among enabled groups if omitted.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | ||
| food_id | Yes | ||
| quantity | No | ||
| measure_id | No | ||
| diary_group | No | ||
| weight_grams | Yes | ||
| food_source_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |