update_meal
Correct a food already in the user's diary — its name, quantity, macros, caffeine or fluid — or change an entry's meal label or note. The entry is identified by id and local_date, and a food by its item_index. Only the fields sent change; macros are merged onto the existing values and overwritten in place, with no history kept. A new quantity sent without macros rescales the food's macros, caffeine and fluid by the new amount ÷ the old one when both are the same kind of amount (a weight, a volume or a count), so '150 g' to '300 g' doubles them; otherwise the macros stay as they were and the reply says so. An entry cannot be moved to another day. All calorie and macro values, including carbohydrates, are estimates from USDA FoodData Central, Open Food Facts, the user's own entry or an AI assistant's estimate — approximate, not lab-measured or specific to a package or batch, and not suitable for insulin dosing (including carb counting for a meal bolus), blood-glucose prediction or any other medical decision.
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": {
"id": "<id>",
"local_date": "<local_date>"
},
"name": "update_meal"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The entry id, shown with each entry in the reply text when a meal is logged or a day or range is read. | |
| meal | No | Move the entry to a different meal label. | |
| name | No | Corrected name of the food. | |
| note | No | Replacement note for the entry. | |
| said | No | The amounts are checked against this: the user's own words for this meal, verbatim (e.g. 'a pint of IPA and wings at the bar'). Only the meal description — not other parts of the conversation. Optional; without it, the amounts are logged as sent. | |
| macros | No | Corrected macros. Only the components included are changed. | |
| fluid_ml | No | Corrected fluid/hydration volume, in millilitres. | |
| quantity | No | Portion as stated, e.g. '2' or '1 cup'. | |
| item_index | No | Which food in the entry's items[] to edit (0-based). Required when changing a food's name/quantity/macros/caffeine/fluid; omit for an entry-level change (meal/note). | |
| local_date | Yes | YYYY-MM-DD diary date of the entry. | |
| caffeine_mg | No | Corrected caffeine content, in milligrams. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entry | Yes | One diary entry: a meal with its foods. | |
| day_totals | Yes |