list_stations
Retrieve a paginated list of all AMeDAS weather stations across Japan to access JMA meteorological data.
Instructions
List all AMeDAS stations (1286 stations) with pagination.
Args: limit: Maximum number of stations to return (default: 100) offset: Number of stations to skip (default: 0)
Returns: Paginated list of stations
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| offset | No |
Implementation Reference
- jma_data_mcp/server.py:102-124 (handler)The handler function for the 'list_stations' MCP tool, decorated with @mcp.tool() for automatic registration. It implements pagination on top of get_all_stations().@mcp.tool() async def list_stations( limit: int = 100, offset: int = 0, ) -> dict: """List all AMeDAS stations (1286 stations) with pagination. Args: limit: Maximum number of stations to return (default: 100) offset: Number of stations to skip (default: 0) Returns: Paginated list of stations """ all_stations = get_all_stations() paginated = all_stations[offset : offset + limit] return { "total": len(all_stations), "offset": offset, "limit": limit, "count": len(paginated), "stations": paginated, }
- jma_data_mcp/stations.py:88-92 (helper)Helper function that loads the full list of AMeDAS stations from the local JSON data file and returns them as a list.def get_all_stations() -> list[dict]: """Get all stations.""" stations = load_stations() return list(stations.values())