Log food from database
log_food_from_databaseLog a food from search_food_database / lookup_barcode results with exact macros scaled to the eaten amount (the preferred path when a photo shows a barcode: lookup_barcode first). meal_type is optional: when the user didn't say, Heza picks it from the local time eaten. Give either food_id (when the result had one) or the full food object copied from the result, plus grams (or servings when serving_size_g is known).
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": "log_food_from_database"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | Local date YYYY-MM-DD (or 'today'/'yesterday'). Defaults to today in the user's timezone. | |
| food | No | The result object from search_food_database or lookup_barcode, unchanged | |
| name | No | Optional display name override | |
| grams | No | ||
| notes | No | ||
| food_id | No | food_id from a search result (cached/custom foods) | |
| servings | No | ||
| logged_at | No | HH:MM (local) or ISO datetime | |
| meal_type | No | Omit when the user didn't say: picked from the local time eaten | |
| idempotency_key | No |