Get Diary
get_diaryThe user's food diary for a date range: what they logged per meal, nutrient totals per day, goal progress and notes.
nutrients names each nutrient code once, with its unit and the user's target. days[].totals holds only non-zero values by code. is_limit means the target is a maximum, not something to reach.
Totals cover the nutrients the user tracks. Pass codes to get specific nutrients instead, which also keeps long ranges small.
detail: "summary" (up to 31 days) or "meals", which adds nutrient totals per meal (up to 7 days).
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": {
"start_date": "<start_date>",
"end_date": "<end_date>"
},
"name": "get_diary"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| codes | No | Only these nutrient codes, from list_components. | |
| detail | No | How much to return per day. | summary |
| end_date | Yes | Last day, YYYY-MM-DD. | |
| start_date | Yes | First day, YYYY-MM-DD. |