update_custom_food
Edit a custom food's details—name, notes, nutrients, or serving sizes—without losing existing diary entries. Corrections update nutrition for all logged entries automatically.
Instructions
Edit one of your custom foods in place, keeping its diary entries.
Only what you pass changes. Entries already logged stay attached to this same food and their nutrition follows the edit, so a typo or a wrong nutrient can be fixed without re-logging anything.
Nutrients are merged into the existing profile, so correcting one value leaves the rest alone. Call list_nutrients for the accepted names.
Args: food_id: The custom food to edit. name: New name. notes: New note text. nutrients: Nutrient name to amount per serving, merged in. measures: [{"measure_id": int, "name": str, "grams": float}] to fix a wrongly weighted measure. name and grams are each optional. Leave measure_id out to ADD a serving size instead, giving name and grams: that is how a food gets a per-piece measure such as "1 karkki" or "1 viipale" alongside plain grams, so it can be logged by the count as well as by weight.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| notes | No | ||
| food_id | Yes | ||
| measures | No | ||
| nutrients | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |