get_stations_of_type
Retrieve AMeDAS weather stations by type (A-F) to access Japan Meteorological Agency data from specific station categories.
Instructions
Get all AMeDAS stations of a specific type.
Args: station_type: Station type - A (Staffed), B (Special Regional), C (AMeDAS), D (Rain Gauge), E (Snow Depth), F (Regional Rain)
Returns: List of stations of the specified type
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| station_type | Yes |
Implementation Reference
- jma_data_mcp/server.py:83-99 (handler)MCP tool handler for get_stations_of_type, including registration via @mcp.tool(), input validation, and response formatting using the stations helper.
@mcp.tool() async def get_stations_of_type( station_type: str, ) -> dict: """Get all AMeDAS stations of a specific type. Args: station_type: Station type - A (Staffed), B (Special Regional), C (AMeDAS), D (Rain Gauge), E (Snow Depth), F (Regional Rain) Returns: List of stations of the specified type """ if station_type not in ["A", "B", "C", "D", "E", "F"]: return {"error": f"Invalid station type: {station_type}. Must be A, B, C, D, E, or F."} stations = get_stations_by_type(station_type) return {"count": len(stations), "type": station_type, "stations": stations} - jma_data_mcp/stations.py:82-85 (helper)Core helper function that filters and returns stations of the specified type from the cached JSON data.
def get_stations_by_type(station_type: str) -> list[dict]: """Get all stations of a specific type (A, B, C, D, E, F).""" stations = load_stations() return [s for s in stations.values() if s["type"] == station_type]