list_christmas_recipes
Get a collection of Christmas recipes for holiday cooking and meal planning. This tool provides festive dish ideas to help you prepare seasonal meals.
Instructions
Returns a list of all Christmas recipes.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- main.py:149-152 (handler)The main handler function for the 'list_christmas_recipes' tool. It calls the 'christmas_recipes' resource and converts the Recipe models to dictionaries for return.async def list_christmas_recipes() -> List[Dict]: """Retourne la liste de toutes les recettes de Noël.""" return [recipe.model_dump() for recipe in christmas_recipes()]
- main.py:50-57 (schema)Pydantic BaseModel defining the schema for Recipe objects, which structure the output data of the tool.class Recipe(BaseModel): name: str category: str # "Entrée", "Plat principal", "Dessert" servings: int ingredients: Dict[str, str] # e.g., {"chocolat noir": "200g"} instructions: List[str] wine_pairing: Optional[str] = None
- main.py:145-148 (registration)The @mcp.tool decorator that registers the 'list_christmas_recipes' tool with its name and description.@mcp.tool( name="list_christmas_recipes", description="Returns a list of all Christmas recipes.", )
- main.py:99-141 (helper)The 'christmas_recipes' resource function that provides the hardcoded list of Christmas recipes used by the tool handler. (Excerpt shows structure; full list includes 3 recipes.)def christmas_recipes() -> List[Recipe]: """Liste de recettes de Noël.""" return [ Recipe( name="Dinde de Noël", category="Plat principal", servings=8, ingredients={"dinde": "1", "marrons": "500g", "beurre": "100g", "sel": "1 pincée", "poivre": "1 pincée"}, instructions=[ "Préchauffer le four à 180°C.", "Farcir la dinde avec les marrons.", "Badigeonner de beurre, saler et poivrer.", "Enfourner pour 3 heures.", ], wine_pairing="Bourgogne rouge", ), Recipe( name="Bûche de Noël", category="Dessert", servings=6, ingredients={"chocolat noir": "200g", "beurre": "100g", "sucre": "150g", "oeufs": "4", "farine": "50g"}, instructions=[ "Faire fondre le chocolat avec le beurre.", "Ajouter le sucre, les oeufs et la farine.", "Verser sur une plaque et cuire 10 minutes.", "Rouler la bûche et la laisser refroidir.", ], wine_pairing="Champagne", ), Recipe( name="Saumon fumé sur blinis", category="Entrée", servings=4, ingredients={"saumon fumé": "4 tranches", "blinis": "8", "crème fraîche": "100g", "ciboulette": "1 botte"}, instructions=[ "Tartiner les blinis de crème fraîche.", "Ajouter une tranche de saumon fumé.", "Ciseler la ciboulette et en parsemer les blinis.", ], wine_pairing="Sancerre", ), ]