get_daily_forecast
Retrieve the daily weather forecast for any Spanish municipality using its AEMET code. Access accurate meteorological data directly via the AEMET-MCP server.
Instructions
Get the daily weather forecast for a Spanish municipality.
Args: municipality_code: AEMET municipality code (e.g., "28079" for Madrid)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| municipality_code | Yes |
Implementation Reference
- src/aemet_mcp/server.py:155-165 (handler)The main handler function for the 'get_daily_forecast' tool. It is registered via the @mcp.tool() decorator and fetches the daily weather forecast from AEMET API using the provided municipality code.@mcp.tool() async def get_daily_forecast(municipality_code: str): """Get the daily weather forecast for a Spanish municipality. Args: municipality_code: AEMET municipality code (e.g., "28079" for Madrid) """ url = f"{AEMET_API_BASE}/prediccion/especifica/municipio/diaria/{municipality_code}" return await make_aemet_request(url)