log_meal
Add a meal to the user's food diary: one or more food items, each with an optional quantity and macros, plus an optional meal label, date, note and provenance source. The reply names the new entry's id and local_date, which identify it for a later edit or deletion. A restaurant meal's numbers depend most on the restaurant, the specific menu item, its size and its add-ons (cheese, fries, sauce, dressing); a bare dish name is logged as a typical serving. When the user names one of their saved recipes ("my chicken and rice", "half my chili"), send their words as one item's name, with any amount in quantity; Forkmate logs the recipe's own foods and numbers in its place. Portion amounts are checked against the user's own words for the meal when they arrive in said, and the reply lists each food with the amount it was logged at. 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": {
"items": "<items>"
},
"name": "log_meal"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| at | No | ISO-8601 instant the meal was eaten; defaults to now. | |
| meal | No | Which meal of the day this was. | |
| note | No | Optional free-text note stored with the meal, e.g. 'post-run'. | |
| 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. | |
| items | Yes | The foods in this meal, one entry per food. | |
| source | No | Optional provenance for these items: the `source` label of the food-database candidate they came from ('USDA', 'Open Food Facts', 'Forkmate' or 'product label'), or 'estimate'. Defaults to 'estimate'; unrecognized values are recorded as an estimate. | |
| local_date | No | YYYY-MM-DD diary date; defaults to the user's local date (from their timezone). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entry | Yes | One diary entry: a meal with its foods. | |
| day_totals | Yes |