meal_log_add
Append an eaten food to the local meal log, optionally snapshotting Open Food Facts nutrients by barcode and grams or servings. Use it to track daily meals privately, with no upload.
Instructions
Append one eaten food to the local meal log (a JSON file on disk; nothing is uploaded). Pass a barcode to snapshot Open Food Facts nutrients, plus grams or servings. Without a barcode, pass a name and grams (nutrients are then omitted from totals). Optional meal slot and UTC date (YYYY-MM-DD).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "meal_log_add"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | UTC calendar date YYYY-MM-DD. Defaults to today (UTC). | |
| meal | No | Meal slot: breakfast, lunch, dinner, or snack. | |
| name | No | Food name. Required when barcode is omitted. Overrides the product name when both are set. | |
| note | No | Optional short note stored only in the local log. | |
| grams | No | Amount eaten, in grams. Required unless servings is set with a barcode. | |
| barcode | No | Open Food Facts barcode. When set, nutrients are snapshotted for the amount eaten. | |
| servings | No | Number of label servings. Requires a barcode whose serving size is known. Ignored when grams is set. |