search_by_ingredient
Find Christmas recipes using a specific ingredient. Search the recipe database to discover holiday dishes based on what you have available.
Instructions
Search for Christmas recipes containing a specific ingredient.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ingredient | Yes |
Implementation Reference
- main.py:157-163 (handler)The async handler function that executes the search_by_ingredient tool logic by filtering Christmas recipes containing the given ingredient.async def search_by_ingredient(ingredient: str) -> List[Dict]: """Recherche les recettes de Noël contenant un ingrédient spécifique.""" results = [] for recipe in christmas_recipes(): if ingredient.lower() in [ing.lower() for ing in recipe.ingredients.keys()]: results.append(recipe.model_dump()) return results
- main.py:153-156 (registration)The @mcp.tool decorator that registers the search_by_ingredient tool with the MCP server.@mcp.tool( name="search_by_ingredient", description="Search for Christmas recipes containing a specific ingredient.", )