forecast_tools
Forecast and warning tools for MCP server.
This module contains tool functions for weather forecasts and warnings including: - Short-term forecasts (up to 3 days) - Medium-term forecasts (3-10 days) - Weekly forecasts - Weather warnings and alerts - Special weather reports
get_current_weather_warnings(region_id=0)
¶
Get current active weather warnings and alerts.
Provides information about active severe weather warnings including heavy rain, strong winds, heavy snow, and other hazards.
Parameters:
-
region_id(int, default:0) –Region code (0 for all regions, default: 0)
Returns:
-
str–Current active weather warnings in JSON format
Source code in python/src/kma_mcp/tools/forecast_tools.py
get_medium_term_forecast(forecast_time, region_code=None)
¶
Get medium-term weather forecast (3-10 days) by region.
Provides weather predictions for 3-10 days ahead including general weather trends and temperature ranges.
Parameters:
-
forecast_time(str) –Forecast time in 'YYYYMMDDHHmm' format (e.g., '202501011200')
-
region_code(str | None, default:None) –Forecast region code (None for all regions)
Returns:
-
str–Medium-term weather forecast in JSON format
Source code in python/src/kma_mcp/tools/forecast_tools.py
get_short_term_forecast(forecast_time, region_code=None)
¶
Get short-term weather forecast (up to 3 days) by region.
Provides weather predictions for the next 3 days including temperature, precipitation probability, sky conditions, and wind.
Parameters:
-
forecast_time(str) –Forecast time in 'YYYYMMDDHHmm' format (e.g., '202501011200')
-
region_code(str | None, default:None) –Forecast region code (None for all regions)
Returns:
-
str–Short-term weather forecast in JSON format
Source code in python/src/kma_mcp/tools/forecast_tools.py
get_short_term_overview(forecast_time, region_code=None)
¶
Get short-term weather overview.
Provides overview of short-term weather forecast.
Parameters:
-
forecast_time(str) –Forecast time in 'YYYYMMDDHHmm' format (e.g., '202501011200')
-
region_code(str | None, default:None) –Forecast region code (None for all regions)
Returns:
-
str–Short-term weather overview in JSON format
Source code in python/src/kma_mcp/tools/forecast_tools.py
get_special_weather_report(report_time, region_id=0)
¶
Get special weather report.
Provides special weather reports for significant weather events.
Parameters:
-
report_time(str) –Report time in 'YYYYMMDDHHmm' format (e.g., '202501011200')
-
region_id(int, default:0) –Region code (0 for all regions, default: 0)
Returns:
-
str–Special weather report in JSON format
Source code in python/src/kma_mcp/tools/forecast_tools.py
get_weather_warning_history(start_date, end_date, region_id=0)
¶
Get weather warning history for a date range.
Parameters:
-
start_date(str) –Start date in 'YYYYMMDD' format (e.g., '20250101')
-
end_date(str) –End date in 'YYYYMMDD' format
-
region_id(int, default:0) –Region code (0 for all regions, default: 0)
Returns:
-
str–Weather warning history in JSON format