Change a logged food
update_itemChange a logged food row's quantity or eaten/planned status in Fitatu; only those fields can change. To edit another food or custom nutrition, remove the row and add it again.
Instructions
Change a logged food row: its quantity (in the row's own measure, see measure_name and measure_quantity in get_day) and/or eaten. Nothing else can be changed: for another food, or a custom row's name or nutrition, remove the row and add it again. Activities cannot be updated: remove and add them again. data.ok says a re-read shows the change; data.previous is the row's quantity and eaten before it, to undo the change.
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. | |
| eaten | No | true for eaten, false for only planned. | |
| row_id | Yes | row_id of a food row on that day, from get_day (meals[].items[].row_id). | |
| quantity | No | New measure_quantity. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| data | No | ||
| error | No | describe_error() of what went wrong; docs/AGENTS.md, Results and errors. |