Update Food (diary patch)
update_foodModify an existing food diary entry by providing its unique ID and any fields to update, such as dish name, notes, or meal time. Adjusts details like cost, companions, or venue without creating a new record.
Instructions
MUTATES 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, append_notes (concat), consumed_at / meal_period (profile TZ civil wall-clock), amount, currency, paid_by / payment_method, 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) | |
| request_id | No | Client idempotency key (retries return original result). | |
| consumed_at | No | ISO 8601 datetime; wins over meal_period | |
| meal_period | No | Spoken period when consumed_at is omitted, e.g. "late lunch" | |
| append_notes | No | Append text to existing notes (newline-separated) | |
| people_names | No | Alias for with | |
| payment_method | No | Alias of paid_by for expense-style agents | |
| idempotency_key | No | Alias for request_id. |
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 |