Loki Docs
Tools › Meals › Update a meal

Update a meal

update_mealChanges
What it does
Changes or deletes something you had. Your assistant can ask you to confirm first. Safe to retry: the same call twice changes nothing more.
Permission
Meals, change meals:write

What your assistant is told

Replace an existing meal's items and/or meta in one call. Pass meal_id plus the desired end state — items provided REPLACE the whole item list, absent items leave existing items alone. Use for chat edits like "change the rice to 200g" or "swap chicken for tofu": send the target state, not a diff. Each item is EITHER {food_id, quantity_g} OR {name + absolute macros}, same shape as log_meal. items is a REPLACE, not a merge: whatever you send becomes the whole meal and the previous items are gone, so read the meal first (get_meals_in_range) and send every item you want kept. The other fields are a normal patch — omit one to leave it alone.

Parameters

  • meal_idid, requiredId of the meal to update (from a prior log_meal or get_meals_in_range).
  • itemslist of object, optionalOptional replacement items. Omit to keep existing items; supply to replace the whole list.
  • at_isotext, optionalOptional new eaten-at timestamp, ISO-8601 WITH the user's UTC offset (e.g. 2026-06-17T23:30:00+03:00). Omit to keep.
  • meal_typetext, optionalOptional new meal type: breakfast | lunch | dinner | snack. Omit to keep.
  • notestext, optionalOptional new note. Omit to keep.