Log Food
log_foodAdd foods to the user's diary. Use when the user asks to log something. Each item is a food_id from a food search and a food_measure_id from that food's measures: quantity counts that measure, so 3 of a "medium" measure is three medium potatoes. All items are logged, or none if one is invalid.
For a drink, "oz" means fluid ounces: the fl oz measure, not ounces, which is weight. "A serving" is the serving measure: on a recipe, servings is one of the portions the whole recipe makes.
Logging a food already in that meal with the same measure adds to the same entry. The result lists each food and amount logged, and any insights the app noted.
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": {
"date": "<date>",
"meal": "<meal>",
"items": "<items>",
"request_id": "<request_id>"
},
"name": "log_food"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | The day, YYYY-MM-DD. | |
| meal | Yes | ||
| items | Yes | The foods to log, up to 30. | |
| request_id | Yes | A new unique string for this action. Reuse it only when retrying the same action. |