generate_recipe_from_ingredients
Create Christmas recipes using available ingredients. This tool helps you make festive meals from what you have on hand.
Instructions
Generates a new Christmas recipe from a list of ingredients.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ingredients | Yes |
Implementation Reference
- main.py:240-254 (handler)The async handler function implementing the tool logic: generates a simple hardcoded Christmas recipe using the provided ingredients list.async def generate_recipe_from_ingredients(ingredients: List[str]) -> Dict: """Génère une nouvelle recette de Noël à partir d'une liste d'ingrédients.""" return { "name": "Recette créative de Noël", "category": "Plat principal", "servings": 4, "ingredients": {ingredient: "quantité au goût" for ingredient in ingredients}, "instructions": [ "Préchauffer le four à 180°C.", "Mélanger tous les ingrédients dans un plat.", "Enfourner pour 30 minutes.", "Déguster avec amour.", ], "wine_pairing": "Un vin qui vous fait plaisir !", }
- main.py:236-239 (registration)The @mcp.tool decorator registering the handler function with the MCP server.@mcp.tool( name="generate_recipe_from_ingredients", description="Generates a new Christmas recipe from a list of ingredients.", )