create_shopping_list
Generate a shopping list for any recipe by providing the recipe name, helping you prepare ingredients before cooking.
Instructions
Creates a shopping list for a recipe.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| recipe_name | Yes |
Implementation Reference
- main.py:218-223 (handler)The asynchronous handler function that executes the core logic of the 'create_shopping_list' tool by searching for a matching recipe and returning its ingredients.async def create_shopping_list(recipe_name: str) -> Dict: """Crée une liste de courses pour une recette.""" for recipe in christmas_recipes(): if recipe.name.lower() == recipe_name.lower(): return {"recipe": recipe.name, "ingredients": recipe.ingredients} return {"error": "Recette non trouvée."}
- main.py:214-217 (registration)The @mcp.tool decorator that registers the 'create_shopping_list' tool with its name and description.@mcp.tool( name="create_shopping_list", description="Creates a shopping list for a recipe.", )