add_food_entry
Add a food entry to your Cronometer diary by specifying food ID, source, weight in grams, and date for accurate nutrition tracking.
Instructions
Add a food entry to the Cronometer diary.
Use search_foods to find food_id and food_source_id, then get_food_details for measure_id and weight_grams.
For CRDB/custom foods, you can omit measure_id (defaults to a universal NCCDB measure that works for all food sources). When measure_id is omitted, quantity is set to weight_grams.
Args: food_id: Numeric food ID from search_foods results. food_source_id: Food source ID from search_foods results. weight_grams: Weight of the serving in grams. date: Date to log the entry as YYYY-MM-DD (e.g. "2026-03-04"). measure_id: Measure/unit ID. Pass 0 (default) to use the universal measure that works for all food sources. quantity: Number of servings. Defaults to weight_grams when measure_id is 0 (universal gram-based measure). diary_group: Diary group name (case-insensitive) or 0-based index. Names are user-configured and are not always Breakfast/Lunch/Dinner/Snacks — call list_diary_groups to see this account's groups. Defaults to a time-of-day choice among enabled groups if omitted.
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>",
"food_source_id": "<food_source_id>",
"weight_grams": "<weight_grams>",
"date": "<date>"
},
"name": "add_food_entry"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | ||
| food_id | Yes | ||
| quantity | No | ||
| measure_id | No | ||
| diary_group | No | ||
| weight_grams | Yes | ||
| food_source_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |