Edit food consumption
metri_edit_consumptionCorrect a diary consumption using absolute target values. Returns the whole consumption as it now stands, shaped as in metri_get_diary, and the refreshed current-day dashboard. An item keeps its food as it was logged, so a quantity edit recalculates from that copy, not from later edits to the saved food; a batch item always reads its batch as last corrected.
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": {
"consumptionId": "<consumptionId>"
},
"name": "metri_edit_consumption"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Replacement user-facing event name. Do not generate a paraphrase of a sole food item. | |
| consumedAt | No | New time of the event, as local time in the user's time zone, such as 2026-10-22T13:05. A time metri returned, with its UTC offset, can be passed as it is. Omit to keep the current time. | |
| itemChanges | No | Changes to the event's items. Omit to keep the items as they are. | |
| consumptionId | Yes | The eating event to edit, from metri_get_diary or an earlier metri result. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| items | Yes | ||
| render | Yes | ||
| totals | Yes | ||
| warnings | No | ||
| dashboard | Yes | ||
| consumedAt | Yes | ||
| consumptionId | Yes |