add_food_entry
Logs a food serving into a Cronometer diary using food and measure IDs, grams, date, meal slot, and time for accurate nutrition tracking.
Instructions
Add a food entry to the Cronometer diary.
Use search_foods to find food_id and measure_id, then get_food_details to confirm serving sizes and gram weights.
Args: food_id: Numeric food ID from search_foods results. measure_id: Measure/unit ID from get_food_details. grams: Weight of the serving in grams. Real grams for recipes too: the conversion to Cronometer's batch units happens here. date: Date to log as YYYY-MM-DD (defaults to today). translation_id: Translation ID from search results (usually 0). diary_group: Meal slot -- one of "auto", "breakfast", "lunch", "dinner", "snacks" (case-insensitive, default "auto"). time: Time of day as HH:MM or HH:MM:SS. Defaults to now. Pass the real eating time when logging after the fact; an "auto" diary_group then follows that hour instead of the current one.
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": {
"food_id": "<food_id>",
"measure_id": "<measure_id>",
"grams": "<grams>"
},
"name": "add_food_entry"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | ||
| time | No | ||
| grams | Yes | ||
| food_id | Yes | ||
| measure_id | Yes | ||
| diary_group | No | auto | |
| translation_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |