update_custom_food
Modify an existing custom food's nutrition, name, or serving size. Only the values you specify change, and diary entries using that food update automatically.
Instructions
Edit an existing custom food (one you created) in place.
Only the arguments you pass change; everything else keeps its current value. Find the food_id with search_foods (source "Custom") or get_food_details. Diary entries that already use the food pick up the new values. Recipes cannot be edited with this tool, even though they also show as source "Custom".
Nutrient amounts are per serving: the food's default serving, or serving_grams when you pass it. To change the serving weight without re-entering nutrition, pass serving_grams alone; the stored per-100g values stay put, so the per-serving numbers scale with the new weight.
Args: food_id: ID of the custom food to edit. name: New food name. calories: Calories per serving (kcal). protein_g: Protein per serving (g). fat_g: Fat per serving (g). carbs_g: Carbs per serving (g). fiber_g: Fiber per serving (g). sugar_g: Sugar per serving (g). sodium_mg: Sodium per serving (mg). saturated_fat_g: Saturated fat per serving (g). extra_nutrients: Additional nutrients keyed by Cronometer nutrient ID (from get_daily_nutrition) and valued per serving; must not reuse an ID the named args already cover. serving_name: New name for the default serving. serving_grams: New weight of the default serving in grams.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| fat_g | No | ||
| carbs_g | No | ||
| fiber_g | No | ||
| food_id | Yes | ||
| sugar_g | No | ||
| calories | No | ||
| protein_g | No | ||
| sodium_mg | No | ||
| serving_name | No | ||
| serving_grams | No | ||
| extra_nutrients | No | ||
| saturated_fat_g | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |