update_custom_food
Update an existing custom food in your Garmin nutrition library while preserving omitted fields, so you can change only the nutritional values or serving details you specify.
Instructions
Update an existing custom food in the user's Garmin nutrition library
Fetches the food's current record (by food_id, so renaming is safe)
before writing so that omitted optional fields (brand, carbs, protein,
fat, micros, etc.) preserve their existing values rather than being
cleared. Only the fields you explicitly pass are changed; everything
else is carried forward from the current record.
Garmin replaces the whole record on update. If the current record
cannot be read, the update is refused unless serving_unit and
number_of_units are given; the call then replaces the record in full,
and any brand or nutrient you omit is cleared.
Only future logs see the change. Each food-log entry stores its own
copy of the food's nutrition from when it was logged, so entries
already logged, and those days' summaries, keep the old values. To
correct a past day, delete_food_log each affected entry and log it
again after the update.
All nutrient amounts are ABSOLUTE values per serving, not %DV.
Nutrition labels often print %DV for calcium/iron/vitamin D —
convert to absolute units before passing.
Use get_custom_foods first to find the foodId and servingId.
Args:
food_id: ID of the custom food to update (from get_custom_foods)
serving_id: Serving ID of the food (from get_custom_foods)
food_name: Name of the custom food
calories: Calories per serving
serving_unit: Unit for serving size (e.g. "G", "ML", "OZ");
omit to preserve the existing value
number_of_units: Serving size in the specified unit;
omit to preserve the existing value
brand_name: Brand or vendor name; omit to preserve the existing value
carbs: Carbohydrates in grams per serving
protein: Protein in grams per serving
fat: Total fat in grams per serving
fiber: Fiber in grams per serving
sugar: Sugar in grams per serving
saturated_fat: Saturated fat in grams per serving
sodium: Sodium in mg per serving
cholesterol: Cholesterol in mg per serving
potassium: Potassium in mg per serving
trans_fat: Trans fat in grams per serving
calcium: Calcium in mg per serving (NOT %DV)
iron: Iron in mg per serving (NOT %DV)
vitamin_d: Vitamin D in mcg per serving (NOT %DV)
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>",
"serving_id": "<serving_id>",
"food_name": "<food_name>",
"calories": "<calories>"
},
"name": "update_custom_food"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fat | No | ||
| iron | No | ||
| carbs | No | ||
| fiber | No | ||
| sugar | No | ||
| sodium | No | ||
| calcium | No | ||
| food_id | Yes | ||
| protein | No | ||
| calories | Yes | ||
| food_name | Yes | ||
| potassium | No | ||
| trans_fat | No | ||
| vitamin_d | No | ||
| brand_name | No | ||
| serving_id | Yes | ||
| cholesterol | No | ||
| serving_unit | No | ||
| saturated_fat | No | ||
| number_of_units | No |