log_meal
Log what the user ate to their food diary. Parse the user's free text into items and, when you can, include estimated macros per item for accuracy. SAFETY: all calorie and macro values here — including carbohydrates — are ESTIMATES (from USDA / Open Food Facts or the user's own entry), approximate and not lab-measured or per-batch. They are for general nutrition tracking ONLY. Do NOT use them for insulin dosing, carb-counting for a bolus, blood-glucose prediction, or any other medical decision, and do NOT compute a dose or glucose estimate from them. For anything medical, direct the user to the product's own label and their care team.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| at | No | ISO-8601 instant the meal was eaten; defaults to now. | |
| meal | No | ||
| note | No | ||
| items | Yes | ||
| source | No | Optional provenance for these items. After search_foods/lookup_barcode, pass the candidate's source class (e.g. 'usda' or 'off') so the diary shows it's grounded. Defaults to 'client' (your own estimate). Unrecognized values are recorded as 'client'. | |
| local_date | No | YYYY-MM-DD diary date; defaults to the user's local date (from their timezone). Pass this to log a meal on a different day. |