scrape_christmas_recipes
Extract Christmas recipe titles from Marmiton.org to gather culinary inspiration for holiday meal planning.
Instructions
Scrapes Christmas recipe titles from Marmiton.org.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "scrape_christmas_recipes"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- main.py:350-360 (handler)The asynchronous handler function that implements the scraping logic for Christmas recipes from Marmiton.org using requests and BeautifulSoup, parsing titles from links containing '/recettes/recette_'.
async def scrape_christmsas_recipes() -> List[str]: """Scrape les titres des recettes de Noël depuis Marmiton.org.""" url = "https://www.marmiton.org/recettes/recherche.aspx?aqt=noël" response = requests.get(url) soup = BeautifulSoup(response.content, 'html.parser') recipes = [] for item in soup.find_all('a', href=lambda x: x and '/recettes/recette_' in x): title = item.text.strip() if title: recipes.append(title) return recipes[:10] # Limiter à 10 pour l'exemple - main.py:346-349 (registration)The @mcp.tool decorator that registers the 'scrape_christmas_recipes' tool with its name and description.
@mcp.tool( name="scrape_christmas_recipes", description="Scrapes Christmas recipe titles from Marmiton.org.", )