Log food consumption
metri_log_consumptionRecord one complete eating event and return the refreshed current-day dashboard. Each item is a saved food by foodId or an inline non-batch food. Create a batch with metri_save_batch first, then log it by foodId. Log a batch by grams only when its finished weight is known; otherwise use fractionOfBatch. Returns each item's id and nutrition in the order of items.
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": {
"name": "<name>",
"items": "<items>"
},
"name": "metri_log_consumption"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Required concise user-facing name for the complete eating event. Preserve a name supplied by the user; otherwise derive a natural name from the consumed foods in the user's language. For a single item, its food name is a valid event name. | |
| items | Yes | The foods eaten in this event, one item per food. | |
| consumedAt | No | When the user ate, 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 when they are eating now: the server uses the current time. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | ||
| render | Yes | ||
| totals | Yes | ||
| warnings | No | ||
| dashboard | Yes | ||
| consumptionId | Yes |