open_weather_forecast_israel
Opens the Israeli weather website and manages initial messages for real-time weather data retrieval.
Instructions
שלב 1: פותח את אתר מזג האוויר בישראל ומטפל בהודעות ראשוניות.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- weather_Israel.py:47-63 (handler)The handler function for the 'open_weather_forecast_israel' tool. Uses Playwright to navigate to a weather forecast website, accepts cookies if prompted, and returns a success message.
@mcp.tool() async def open_weather_forecast_israel() -> str: """ שלב 1: פותח את אתר מזג האוויר בישראל ומטפל בהודעות ראשוניות. """ page = await browser_mgr.ensure_page() await page.goto(FORECAST_URL, wait_until="domcontentloaded") # ניסיון לסגור הודעת קוקיז אם קיימת try: cookie_btn = page.locator("#cookie-accept") if await cookie_btn.is_visible(): await cookie_btn.click(timeout=2000) except: pass return "SUCCESS: האתר פתוח. כעת ניתן להזין שם עיר." - weather_Israel.py:47-47 (registration)The tool is registered via the @mcp.tool() decorator on the async function open_weather_forecast_israel.
@mcp.tool()