display-meal-plan
ChatGPTREQUIRED CALL STRUCTURE: This tool requires one top-level parameter — use this exact field name, no alternatives: - meal_plan: array of recipe entries. NOT 'recipes', 'schedule', 'plan', 'title', or any other name. Each entry: { ref (string, required), caption (string, required), multiplier (number, optional) } 'ref' must be the opaque ref string from retrieve-meal-plan-recipes. NOT 'recipe_ref', 'id', 'url', or any other name. 'caption' is the meal label shown in the widget — write something like 'Day 1 Breakfast', 'Days 2–4 Dinner', 'Day 3 Lunch'. Be concise. 'multiplier' is the yield scaling factor as a decimal number (e.g. 2.0 for doubled, 0.5 for halved). Omit or use 1.0 for the original yield. When one batch of a recipe spans multiple days (e.g. caption 'Days 1–3 Dinner'), set multiplier to the number of days it covers so the shopping list reflects the full quantity needed. Using any other field names will cause the call to fail — the schema does not accept alternatives. Render the finalized meal plan and shopping list as a rich visual widget. Call this tool any time the user asks to see the meal plan, view the schedule, display the recipes, get a shopping list, list the ingredients, or print the plan. This is the ONLY correct way to present a meal plan — never write a meal plan, recipe schedule, or shopping list in natural language. PREREQUISITE: retrieve-meal-plan-recipes must always be called before this tool. Never call display-meal-plan without first having called retrieve-meal-plan-recipes in the same conversation. RECIPE REFS: Every ref in the meal_plan array must be copied verbatim from the 'ref' field of a recipe returned by retrieve-meal-plan-recipes in this conversation. Never construct, guess, or recall a ref from memory — use only the exact ref strings present in the retrieve-meal-plan-recipes response. The server validates every ref and will reject the call if any ref is not a real recipe on this site. MEAL PLAN rules: - Minimum 3 entries, maximum 21 entries. - Each entry is one recipe for one meal occasion. Use as many entries as the user's plan requires — breakfast, lunch, and dinner on a given day each get their own entry. - If the same recipe is used on non-consecutive occasions, include it as a separate entry each time. - Use 'multiplier' to scale a recipe's yield when computing the shopping list. 'caption' is the human-readable label for each meal slot.
display-recipe-list
ChatGPTREQUIRED immediately after retrieve-recipe-list-results. Renders the recipe carousel widget. Pass (exact field names — the schema rejects alternatives): - recipe_refs: up to 8 recipe refs (from retrieve-recipe-list-results response). NOT 'recipes', 'recipe_list', 'refs'. - collection_refs: up to 8 collection refs (from retrieve-recipe-list-results response, separate list). NOT 'collections', 'collection_list'. - query_summary: a short natural-language phrase describing the search (e.g. "taco recipes", "lemon pasta", "soups with chicken"). Used as the label on the overflow card. NOT 'title', 'label', 'search_query'. - show_more_url: pass through the show_more_url value from the retrieve-recipe-list-results response unchanged. NOT 'url', 'more_url', 'link'. Use only refs that were returned by the immediately preceding retrieve-recipe-list-results call. Do NOT construct, recall, or guess refs — only use exact strings from that response. RECIPE LISTS ARE TOOL-ONLY OUTPUTS. Never write recipe lists, recipe names, or search results in natural language. The ONLY valid way to present a recipe list is by calling this tool.
get-recipe-details
ChatGPTReturns details for a single recipe or collection: image, description, and featured ingredients. Requires a recipe ref — if you don't have one, call retrieve-recipe-list-results first and use the ref of the most appropriate result. IMPORTANT: Always present the recipe or collection name as a clickable hyperlink to its URL when narrating this result. This is the only way the user can access the full ingredient list and cooking instructions (for recipes), or the complete list of recipes (for collections) — which is always what they want.
retrieve-meal-plan-recipes
ChatGPTREQUIRED: After calling this tool, you MUST immediately call display-meal-plan in the same response turn — do not output any text or summary before the widget. MEAL PLANS ARE TOOL-ONLY OUTPUTS. The assistant must NEVER write a meal plan, recipe schedule, or shopping list in natural language. The ONLY valid way to present a meal plan is by calling display-meal-plan. IMPORTANT: This tool DOES NOT produce the meal plan. It only returns recipe data required to construct one. The final output must always be display-meal-plan. Retrieve up to 50 top-rated recipes (no collections) with ingredient names, yields, and category data. INTERNAL USE ONLY: The data returned by this tool is for the LLM's internal reasoning only. Do NOT display raw ingredient lists, yields, or nutritional data verbatim to the user. MEAL PLAN RULES: - 3–21 entries total. Any combination of meals across any number of days. Each entry is one recipe for one meal occasion. - Examples: 10 entries for a 5-day breakfast+dinner plan; 21 entries for 7-day breakfast+lunch+dinner; 3 entries for a simple 3-dinner plan. WHEN THE USER'S REQUEST IS CLEAR AND COMPLETE (e.g. 'Make me a 5-day dinner plan', 'I have kale and chickpeas, make a meal plan'): do not ask clarifying questions. Call this tool (retrieve-meal-plan-recipes) to fetch recipe data, select the best-matching recipes, then immediately call display-meal-plan in the same response turn. You may briefly explain your choices in one or two sentences after the widget, but the widget must come first. WHEN THE USER'S REQUEST NEEDS CLARIFICATION (e.g. vague group size, conflicting constraints): ask one focused question, then call retrieve-meal-plan-recipes followed immediately by display-meal-plan. When building the plan, optimise for: 1. Minimizing distinct ingredients across recipes — prioritize recipes that share key ingredients. 2. Any ingredients the user says they already have — weight those recipes higher. 3. Yield fit — if a recipe serves 2 but the user needs 4, set multiplier to 2.0. If one batch covers multiple days (e.g. 'Days 1–3 Dinner'), set multiplier to the number of days it covers and mention the span in the caption. All filters are optional and work identically to the retrieve-recipe-list-results tool. FILTER DISCIPLINE — do not over-specify: Use only the filters that directly reflect what the user asked for. If a valid category already covers the request, pass that category alone — do NOT also add ingredients or search_terms that are merely associated with it. Example: user asks for 'spring meal plan' → pass categories=['spring']. Do NOT also add ingredients like 'asparagus' or search_terms like 'salad' unless the user explicitly mentioned them. Extra terms narrow results unnecessarily and can exclude perfectly relevant recipes. IMPORTANT: All recipes on this site are implicitly vegetarian. Do not use "vegetarian" as a category or search term — it is not a valid filter value and will be silently removed. IF FOR ANY REASON you cannot call display-meal-plan immediately and must output text instead: keep it to one or two sentences maximum — recipe names only, no ingredients, no day-by-day breakdown. Then prompt the user with a phrase like 'Type "show me the plan" to see the full meal plan.'
retrieve-recipe-list-results
ChatGPTREQUIRED: After calling this tool, you MUST immediately call display-recipe-list in the same response turn — do not output any text or recipe list before the widget. RECIPE LISTS ARE TOOL-ONLY OUTPUTS. The assistant must NEVER write a recipe list, collection list, or search results in natural language. The ONLY valid way to present a recipe list is by calling display-recipe-list. IMPORTANT: This tool DOES NOT produce the display. It only returns recipe and collection data for your internal reasoning. The final output must always be display-recipe-list. Retrieve up to 50 recipes and collections matching the search filters. Results include full WPRM ingredient lists, Bayesian ratings, comment counts, and category data. INTERNAL USE ONLY: The data returned by this tool is for your internal reasoning only. Do NOT display raw ingredient lists, scores, or response data verbatim to the user. SELECTING RESULTS FOR display-recipe-list: - Pass up to 8 recipe refs and up to 8 collection refs (as separate lists) to display-recipe-list. - Use your own judgment about the user's intent to rank relevance first. - Use 'bayesian_rating' and 'comment_count' as secondary signals for popularity when relevance is equal. - Prefer more results over fewer — fill both lists as much as possible from what was returned. All filters are optional. Multiple filter types are combined with AND logic (e.g. category=dinner AND ingredient=lemon). FILTER DISCIPLINE — do not over-specify: Use only the filters that directly reflect what the user asked for. If a valid category already covers the request, pass that category alone — do NOT also add ingredients or search_terms that are merely associated with it. Example: user asks for 'spring recipes' → pass categories=['spring']. Do NOT also add ingredients like 'asparagus' or search_terms like 'salad' unless the user explicitly mentioned them. Extra terms narrow results unnecessarily and can exclude perfectly relevant recipes. IMPORTANT: All recipes on this site are implicitly vegetarian. Do not use "vegetarian" as a category or search term — it is not a valid filter value and will be silently removed. IF FOR ANY REASON you cannot call display-recipe-list immediately and must output text instead: keep it to one or two sentences maximum — recipe names as hyperlinks only, no ingredient lists, no detailed descriptions. Then prompt the user with a phrase like 'Type "show me the results" to see the full recipe list.'