get_food_log
Retrieve food diary entries for a single day or the last N calendar days, including meal groups, servings, calories, and nutrient summaries.
Instructions
Get diary entries for one day or the last N calendar days.
Prefer relative inputs for relative questions, rather than dates calculated from conversation history. For calorie/nutrient totals without individual entries, prefer get_daily_nutrition(days=N).
Returns every food entry logged for the day. Each "Serving" entry is enriched (best-effort) with the food's name, source, serving_size, servings, and that food's own nutrient profile scaled to the amount eaten. Non-food entries (exercise, biometrics) carry their own name.
serving_size defines one portion: quantity units weighing grams in total. servings is how many of those portions were consumed. For example, serving_size={quantity: 2, unit: "cookies", grams: 30} with servings=1 means two cookies eaten; servings=0.5 means one cookie eaten. The size uses the entry's selected measure, or the food's default as a fallback. For serving-based recipes, serving_size.grams is null because the API uses reference-serving counts instead of gram weights. An invalid serving_size.quantity is reported as null.
Every diary entry carries diary_group: {group, name}, the meal slot it sits in (e.g. {"group": 4, "name": "Dinner"}). Group names are customizable per account, so read the meal from this field rather than inferring it from the entry's order or time. name is null for a group number the account doesn't define. See get_diary_groups for the full list.
A busy day in "full" detail can be ~170,000 characters, which can exceed a client's output limit. Use detail="compact" (and/or food_id) to keep the response small.
Note: the per-entry "nutrients" are each food's individual contribution, which is distinct from the day-level nutrition_summary aggregate below.
Also returns a top-level energy_summary field with pre-computed values most relevant to the user:
total_target_kcal: daily calorie target dynamically adjusted for expenditure and weight goal (equivalent to Cronometer's "Total Target" in the Energy Summary screen)
consumed_kcal: total calories consumed
remaining_kcal: calories remaining to stay on target (total_target_kcal - consumed_kcal). Always report this when summarizing the user's day. Prefer this over manually deriving values from the burn breakdown fields.
Also returns a nutrition_summary field with consumed totals for every nutrient the user tracks in Cronometer (macros plus any tracked micronutrients such as saturated fat, cholesterol, or omega-3/6):
macros: flat macro totals (energy, protein, carbs, net_carbs, fat, fiber, alcohol)
nutrients: the full list of tracked nutrients with amounts and units
Args: date: Inclusive end date: YYYY-MM-DD, today, yesterday, or N days ago. Defaults to today in the account timezone, resolved at call time. days: Number of calendar days, 1–31 (default 1). Includes the end date; days=3 includes today, date='yesterday', days=3 excludes today. detail: "full" (default) returns every entry as described above. "compact" replaces each diary entry with a small object without per-entry nutrient arrays: entry_id (the servingId, noteId, exerciseId or biometricId that remove_food_entry takes), type, name, food_id, measure_id, grams, servings, time, order (raw), diary_group ({group, name}, as above), kcal, protein_g, carbs_g, fat_g, sodium_mg. Notes also carry their text. grams is passed through as-is (null stays null; for serving-based recipes it is a serving count). Values that cannot be derived are null. energy_summary and nutrition_summary are unchanged. Applies to each day. food_id: Only entries for this Cronometer food ID (non-food entries are excluded). It narrows the diary list only; energy_summary and nutrition_summary still describe the whole day. Applies in both detail modes and to each day.
One day returns the usual date/diary/summaries. Multiple days return start_date, end_date, and a days list of those objects, oldest first.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_food_log"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | ||
| days | No | ||
| detail | No | full | |
| food_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |