fetch_weather
Get current weather conditions for any city to inform planning and decision-making.
Instructions
Fetch current weather for a city
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| city | Yes |
Implementation Reference
- src/espresso_mcp/server.py:476-482 (handler)The handler function for the 'fetch_weather' tool, decorated with @mcp.tool() for registration. It asynchronously fetches weather data for the given city using httpx to query a weather API endpoint.@mcp.tool() async def fetch_weather(city: str) -> str: """Fetch current weather for a city""" async with httpx.AsyncClient() as client: response = await client.get(f"https://api.weather.com/{city}") return response.text