Common MCP tasks
These tasks show the usual tool order. Every tool takes one JSON object. Use the IDs returned by earlier calls; do not build IDs yourself.
The server does the arithmetic: unit conversion, recipe scaling, plan demand, availability, and shopping quantities. Send ingredient names, amounts, and choices. Do not send converted or summed quantities.
For inputs, see MCP tool reference. For client setup, see MCP setup.
Start with the household
- Call
household_getto read the timezone, default servings, spice level, batch sizes, week start, unit system, and planning notes. - Call
rules_listto read dietary rules before you choose recipes.
Plan a week
- Call
household_getif you do not already have the settings. - Call
recipe_searchwithstatus: "rotation"for trusted meals. Trystatus: "want_to_try"for new ones. - Call
recipe_getfor each candidate. Passservingsto get a scaled ingredient list. - Call
recipe_checkfor each recipe. A violation with a condition note is a judgement call. Explain the choice to the user. - Call
pantry_queryfor the ingredients you expect to use, oravailabilityfor an existing plan. An unknown amount means "check the kitchen"; it does not mean zero. - Call
plan_createwithweekStart, cook events, slots, and prep tasks. Give each new cook akey, then point slots at it withcookEventKey. This makes one cook feed several later meals as leftovers. - For a change after the plan exists, call
plan_swap_meal. To add a side to a meal or remove one dish, callplan_dishes. Read the returnedshoppingListStalevalue and regenerate an open list when it istrue.
weekStart must be the household's week start day. Use plan_set_slots to
replace one or more date and meal groups. To put a main and a side on one meal,
give spec an array, for example
[{"kind": "cook", "recipe": "grilled-chicken"}, {"kind": "cook", "recipe": "rice"}].
Change pantry stock
Use pantry_update with action: "bulk" for one or more stock lines. The lines
apply in order and all succeed or all fail.
Recount example:
{
"action": "bulk",
"lines": [
{
"op": "set",
"ingredient": "Chicken breast",
"qty": 2,
"unit": "lb",
"qtyApprox": true,
"reason": "adjust"
}
]
}
Purchase example:
{
"action": "bulk",
"lines": [
{
"op": "adjust",
"ingredient": "Chicken breast",
"delta": 1.5,
"unit": "lb",
"reason": "purchase"
}
]
}
Use op: "set" for a recount. Use op: "adjust" for a known change, such as a
purchase or waste. To mark a row as checked, call pantry_update with
action: "verify" and the pantry row ID.
Record a cook
- Find the cook event with
plan_getorcook_history. - Call
cook_completewithaction: "complete", the cook event ID, actual servings, and a rating. By default, this writes the pantry movements for the scaled ingredients. - Do not also call
pantry_updatefor the same ingredients.
Use action: "skip" when a planned cook did not happen. Use action: "reopen"
to return a completed cook to planned and restore stock. Use action: "undo" to
reverse a completed cook; this also deletes an ad-hoc cook that no plan
references.
Check the result with pantry_history and refType: "cook_event".
Shop from a plan
- Call
shopping_generatewith the meal plan ID. - Call
shopping_getwith the shopping list ID to review items and quantities. - Change the list with
shopping_update: add items, edit items, or check items off withaction: "check". - When the trip is done, call
shopping_complete. Checked items become pantry purchase movements.
If the plan changed after the list was generated, call shopping_generate
again. delete_item removes one item; it does not change the pantry.
Add a recipe
- Call
ingredient_searchfor each ingredient. Reuse existing ingredients. - Call
ingredient_upsertwithaction: "create"for a genuinely new ingredient. - Call
recipe_savewithtitle,servings, the ingredient lines, and the ordered steps. - Call
unit_conversionswithaction: "create"when a package unit such ascanmust compare to a pantry unit. - Call
recipe_check, thenrecipe_set_statuswithwant_to_tryorrotation.
recipe_save creates unknown ingredient names. Search first to avoid near
duplicates. Pass statusNote to record why a status or rating changed.
Safety on writes
Some tools that can delete or overwrite data have a destructive annotation.
Read tools have a read-only annotation. Check annotations with tools/list.
- Confirm destructive actions with the user first. This includes delete, merge,
undo, and deleting a cook or plan. - A timeout does not tell you whether a write reached the server. Read the
current state or history before you retry. Repeating an
adjustline doubles the change; asetline is safer for a recount. - Do not decrement stock after
cook_completeor add stock aftershopping_complete; those tools already write the movements. - Do not edit stock to hide a wrong cook or shopping record. Use
reopen,undo, or a correcting movement with a clearreason. - Unknown ingredient names fail with
unprocessableunless the action creates ingredients. Useingredient_searchfirst. qty: nullmeans an unknown amount, not zero. Read the stock status as well.- Keep movement
reasonvalues accurate:purchase,cook,waste,adjust,verify, orimport.
Tool errors return the same error body as the REST API:
{"error": {"code", "message", "details?"}}. Use the code, not the message
text, to decide what to do.