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 unlocked dinners in one revision (choices pairs slotIds and recipeIds in order; each recipe must belong to its slot unless all slots are interchangeable); 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. For a plan automatically made This Week, an approved change takes the first different matching choice and updates that same live week while it is still current and unedited in the app; Saved Week snapshots stay unchanged. Other proposals remain unselected until chosen. Changes described only in chat leave the plan 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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"menuDraftId": "<menuDraftId>"
},
"name": "revise_weekly_menu"
}
}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 | For two or more dinners only. For one dinner use slotId and replacementRecipeId instead. Pair each unlocked slot with its own offered recipe in the same order. Interchangeable slots may share their offered recipes. 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 | ||
| title | Yes | ||
| appUrl | Yes | ||
| status | Yes | ||
| canUndo | No | ||
| dietary | No | ||
| dinners | Yes | ||
| priority | No | ||
| progress | Yes | ||
| recovery | No | ||
| servings | Yes | ||
| diversity | No | ||
| selection | Yes | ||
| navigation | No | ||
| pantryMode | No | ||
| slotIssues | No | ||
| menuDraftId | Yes | ||
| savedWeekId | No | ||
| recipeSource | No | ||
| changeApplied | No | ||
| savedWeekTitle | No | ||
| diversityStatus | No | ||
| savedWeekAppUrl | No | ||
| focusIngredients | No | ||
| selectionWarnings | No | ||
| allowedNextActions | Yes |