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: "show my vitamin D over the last month", "am I usually over on sodium". Only dates with logged data are returned. INFER, do not ask: days and end_date; defaults are on the params. nutrient 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 whatever the format. 'verbose' always uses key/unit.
DATA COMPLETENESS: totals sum the logged items that carry a value for the nutrient; coverage says how many did. Partial coverage -> say "based on foods with X data". Never call a low intake a deficiency; intake is not a lab result. Supplement vs food is reported separately. A daily supplement counts on every active day by default (the user is not 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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"nutrient": "<nutrient>"
},
"name": "get_nutrient_history"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Days of history ending on end_date; default 30. | |
| format | No | compact (default) packs values by nutrient id, see FORMAT. verbose spells out each nutrient's name and unit. | |
| end_date | No | Last date of the window, YYYY-MM-DD; omit for today (the user's own timezone). | |
| nutrient | Yes | Nutrient name or alias, e.g. "vitamin_d", "calcium", "b12". |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | Human-readable result text returned by the tool. |