get_nutrient_history
Day-by-day history for ONE nutrient over a range, with its target, how many days met it, and how many days went over the upper limit. Use for "show my vitamin D over the last month" or "am I usually over on sodium". Only dates with logged data are returned.
INFER -- do not ask:
days: default to 30
end_date: default to today (resolved in the user's own timezone)
nutrient is required and accepts common aliases (e.g. "b12", "carbs", "fibre").
FORMAT: default 'compact' replies with id (this nutrient's number in get_nutrient_summary's nutrient dictionary, whose unit then applies) instead of key/unit, and drops the target's redundant unit field. A nutrient outside that dictionary has no id, so key/unit are used regardless of format. 'verbose' always uses key/unit, as before.
DATA COMPLETENESS: totals are sums over the logged items that carry a value for that nutrient; coverage tells how many did. Say "based on foods with X data" when coverage is partial; never call a low intake a deficiency; intake is not a lab result; supplement vs food split is reported separately. A daily supplement counts on every day it's active by default -- the user isn't expected to check it off -- unless a day was explicitly marked not taken, so its share of a total can include days with no check-in.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | How many days of history, ending on end_date. Optional -- default 30. | |
| format | No | compact (default) packs values by nutrient id, see FORMAT above. verbose spells out each nutrient's name and unit. | |
| end_date | No | Last date of the window. Format: YYYY-MM-DD. Optional -- omit for today. | |
| nutrient | Yes | Nutrient name or alias, e.g. "vitamin_d", "calcium", "b12". Required. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | Human-readable result text returned by the tool. |