Update Food (diary patch)
update_foodMUTATES one existing Food Diary row the authenticated user owns. Required: food_id (UUID). Optional patch (same fields as log_food): what, kind, place, merchant, notes, consumed_at / meal_period, amount, currency, paid_by, with / people_names / person_ids. Example: add hot tea onto an existing Salmon Bento → update_food({ food_id, what: "Salmon Bento + hot tea" }). Unknown or other-user food_id returns an error and does not create a row. Syncs the mirrored calendar event and rebuilds life_state. Requires API key or OAuth with scope context. Share tokens cannot write. ($0.10; API key required)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | ||
| what | No | Full updated dish/drink text (replaces, does not append). Example: Salmon Bento + hot tea | |
| with | No | Companion names, aliases, or ids to add (does not remove existing tags) | |
| notes | No | Replaces notes. Empty or null clears | |
| place | No | Venue or location. Empty or null clears | |
| amount | No | Price if mentioned | |
| food_id | Yes | UUID of a food diary row the authenticated user owns | |
| paid_by | No | Who paid (name or alias) | |
| currency | No | ISO currency, e.g. SGD | |
| merchant | No | Restaurant, stall, or shop. Empty or null clears | |
| person_ids | No | Owned person UUIDs to tag (user-scoped) | |
| consumed_at | No | ISO 8601 datetime; wins over meal_period | |
| meal_period | No | Spoken period when consumed_at is omitted, e.g. "late lunch" | |
| people_names | No | Alias for with |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| changed | Yes | Changed fields with before and after values. | |
| food_id | Yes | ||
| event_id | Yes | ||
| food_log | Yes | Updated Food Diary row. | |
| people_tagged | Yes | ||
| unresolved_people | Yes | ||
| life_state_rebuilt | Yes |