Read a diary day
get_dayRead a specific day's diary: meals, logged foods, totals, activities, notes, and tag IDs. Use it to get row IDs needed for updating, moving, or removing items.
Instructions
Read one diary day: per meal its meal_key (the slot other tools take), meal_name (the name the user gave it) and every logged food (row_id, food_type, product_id or recipe_id, name, measure_id, measure_name and measure_quantity, weight in g, energy in kcal, protein/fat/carbohydrate/fiber/sugars/salt in g, eaten); per-meal and day totals; and logged activities (row_id, name, energy in kcal burned); note, the user's own text for the day (null without one), and tags_ids, the ids of its note tags. What the user ate is eaten_totals (rows ticked as eaten); when it is 0 but totals is not, the rows are logged without the tick, so use totals and say so. totals counts every row, planned or eaten. Burned energy is not subtracted. Read the day first to get the row_ids that update_item, move_item and remove_items take. A PRODUCT or RECIPE row's product_id or recipe_id is the food_id that add_food takes, with its food_type, measure_id and measure_quantity as quantity.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | Day as YYYY-MM-DD; when the user says today, yesterday, this week or a weekday, call get_today and count from its date. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| data | No | ||
| error | No | describe_error() of what went wrong; docs/AGENTS.md, Results and errors. |