Replace Fitatu Meal Item
replace_meal_itemReplace an existing Fitatu meal item using date, mealKey, itemId, and a new product, recipe, or custom item. Preserves eaten state unless specified, and returns the new itemId.
Instructions
Replaces and confirms one existing Fitatu meal item. Select the existing entry by its exact date, mealKey, and itemId, then provide replacement using the same strict PRODUCT, RECIPE, or fallback CUSTOM_ITEM payload accepted by add_meal_items. If replacement.eaten is omitted, the existing eaten state is preserved. Replacing a PRODUCT or RECIPE with the same catalog definition is rejected; use update_meal_item for quantity, measure, or eaten changes. Returns { status: 'confirmed', date, mealKey, previousItemId, itemId }; use the returned itemId for later mutations. The new item remains in the same meal, but item order is not part of the contract.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | Day containing the item to replace, in YYYY-MM-DD format. | |
| itemId | Yes | Existing meal item id. Use itemId returned by get_day_plan_items. | |
| mealKey | Yes | Meal key containing the item. Use mealKey values returned by get_day_plan_items. Typical keys are breakfast, second_breakfast, lunch, snack, supper, but accounts with renamed or additional meals may use other keys such as dinner. | |
| replacement | Yes | New meal item using the same payload as one entry in add_meal_items.items. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | Day containing the confirmed replacement item. | |
| itemId | Yes | Persisted meal item id to use in later update, move, replace, or remove operations. | |
| status | Yes | The requested mutation was observed in the persisted Fitatu day plan. | |
| mealKey | Yes | Meal containing the confirmed replacement item. | |
| previousItemId | Yes | Previous item id confirmed absent after replacement. |