invent_recipe
Generate culinary recipes from available ingredients, providing structured cooking instructions and serving sizes for meal planning.
Instructions
Invents a recipe from ingredients (structured format).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ingredients | Yes | ||
| servings | No |
Implementation Reference
- main.py:273-284 (handler)The main handler function that executes the tool logic for 'invent_recipe', taking ingredients and servings, and returning a simple recipe dictionary.async def invent_recipe(ingredients: list[str], servings: int = 4) -> dict: """Invente une recette à partir des ingrédients et du nombre de personnes.""" logger.info("invent_recipe called with ingredients=%s, servings=%s", ingredients, servings) # ta logique recipe = { "title": "Entrée de fête au foie gras et fruits", "ingredients": ingredients, "servings": servings, } logger.info("invent_recipe returning recipe=%s", recipe) return recipe
- main.py:269-272 (registration)The decorator that registers the 'invent_recipe' tool with MCP, specifying its name and description.@mcp.tool( name="invent_recipe", description="Invents a recipe from ingredients (structured format).", )