Change one dinner or its servings
revise_weekly_menuChanges a menu draft and returns the updated draft with a new menuDraftId; unrelated dinners, locks, dietary rules and pantry choice are kept. Operations: select one offered choice for a slot (slotId + replacementRecipeId, which also locks it); select several offered recipes together across interchangeable slots (choices); five new choices for one slot (slotId + reroll: true); top up every slot listed in slotIssues in one call (refillShortSlots: true, no slotId); change a slot's protein, timing or health aim (slotRequirement or replacementBrief); change servings for one slot, or for the whole week without slotId; change pantry ranking (pantryMode, focusIngredients); lock or unlock a dinner (locked); undo the last change (undoLastChange). An explicit chooseForMe request can select a matching candidate for one slot; ordinary replacement requests leave that slot unselected. Nothing is selected implicitly, and changes described only in chat leave the draft as it was. The returned menuDraftId is the one to save or shop. A stale-edit error includes the current draft and changeApplied=false; the returned state supports review and a retry of only the unapplied change using its current menuDraftId. Exact slot IDs and labels come from get_menu_draft. Choosing and changing dinners works before sign-in; saving or shopping the result needs a linked account.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slot | No | Exact slot label to change; never rebuild unrelated dinners. | |
| locked | No | Keep this dinner through future changes. Unlock explicitly before replacing. | |
| reroll | No | Five new candidates for the target unresolved slot only. Preserve all constraints and unrelated slots; exclude its previously shown recipes where possible. | |
| slotId | No | Stable slot ID, preferred over the legacy slot label. | |
| choices | No | Add and keep recipes together in interchangeable unlocked slots. Supply one distinct offered recipe per slot. This is one atomic draft revision; never combine with other edits. | |
| servings | No | Change the selected slot, or all slots when slot is omitted. | |
| pantryMode | No | Refresh unselected dinners using this task-only pantry choice, preserving all selected slots, servings and dietary restrictions. | |
| chooseForMe | No | Select one matching candidate for this slot only when the user explicitly asks you to choose. May accompany replacementBrief or reroll. Never saves or activates the week. | |
| menuDraftId | Yes | ||
| undoLastChange | No | Undo the latest draft edit as a new revision. Does not change Saved Weeks, This Week or previous shopping lists. | |
| slotRequirement | No | Replace this slot’s structure only. Other dinners stay unchanged. | |
| focusIngredients | No | ||
| refillShortSlots | No | One repair for the whole draft: top up every unselected slot that has fewer than five candidates (see slotIssues), keeping its existing cards, every full slot and every selection. No slotId. Use this instead of rerolling short slots one by one; do not call it when slotIssues is empty. | |
| replacementBrief | No | What to change about this dinner, e.g. vegetarian or something new. Existing exclusions remain enforced. | |
| replacementRecipeId | No | Select an exact offered alternative for this slot. Must belong to this draft's options; cannot duplicate another chosen dinner. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| brief | No | ||
| debug | No | ||
| title | Yes | ||
| appUrl | Yes | ||
| status | Yes | ||
| canUndo | No | ||
| dietary | No | ||
| dinners | Yes | ||
| priority | No | ||
| progress | Yes | ||
| servings | Yes | ||
| diversity | No | ||
| selection | Yes | ||
| navigation | No | ||
| pantryMode | No | ||
| slotIssues | No | ||
| menuDraftId | Yes | ||
| savedWeekId | No | ||
| recipeSource | No | ||
| savedWeekTitle | No | ||
| diversityStatus | No | ||
| savedWeekAppUrl | No | ||
| focusIngredients | No | ||
| selectionWarnings | No | ||
| allowedNextActions | Yes |