Skip to main content
Glama
Symfomany

Recettes MCP Server

by Symfomany

get_random_recipe

Get a random Christmas recipe to solve meal planning challenges and inspire holiday cooking.

Instructions

Returns a random Christmas recipe.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • main.py:165-168 (registration)
    Registration of the 'get_random_recipe' tool using the @mcp.tool decorator, specifying its name and description.
    @mcp.tool(
        name="get_random_recipe",
        description="Returns a random Christmas recipe.",
    )
  • main.py:169-171 (handler)
    The handler function for 'get_random_recipe'. It selects a random recipe from the christmas_recipes() list and returns it as a dictionary using model_dump().
    async def get_random_recipe() -> Dict:
        """Retourne une recette de Noël au hasard."""
        return random.choice(christmas_recipes()).model_dump()
  • Helper function 'christmas_recipes()' that provides the list of hardcoded Christmas recipes used by the get_random_recipe tool.
    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",
            ),
        ]
  • main.py:50-57 (schema)
    Pydantic BaseModel 'Recipe' defining the structure for recipes, used in christmas_recipes() and returned by 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
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden but only states the basic action without behavioral details. It doesn't disclose if the recipe is from a fixed set, how randomness is implemented, potential rate limits, or error conditions, which are important for an agent to understand its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words, clearly front-loading the core functionality. It's appropriately sized for a simple tool, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, output schema exists), the description is minimally adequate but lacks depth. Without annotations, it should explain more about the randomness (e.g., source or constraints) to fully guide an agent, though the output schema may cover return values.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so no parameter documentation is needed. The description doesn't add parameter semantics, but this is acceptable given the lack of parameters, aligning with the baseline for zero parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Returns') and resource ('a random Christmas recipe'), making the purpose understandable. However, it doesn't differentiate from siblings like 'get_recipe_by_index' or 'list_christmas_recipes' by specifying what makes it 'random' (e.g., selection method or scope).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. With siblings like 'get_recipe_by_index' (specific recipe) and 'list_christmas_recipes' (all recipes), the description lacks context on when randomness is preferred, such as for inspiration or surprise, leaving usage unclear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Symfomany/mcp-tuto'

If you have feedback or need assistance with the MCP directory API, please join our Discord server