Skip to main content
Glama

list_stations

Retrieve paginated lists of AMeDAS weather stations across Japan to access meteorological data from the Japan Meteorological Agency.

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
NameRequiredDescriptionDefault
limitNo
offsetNo

Implementation Reference

  • The main asynchronous handler function for the 'list_stations' MCP tool, decorated with @mcp.tool() for automatic registration. It fetches all stations via get_all_stations() helper and implements pagination based on limit and offset parameters.
    @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, }
  • Supporting helper function that loads the complete dictionary of AMeDAS stations from the local JSON file (via load_stations()) and returns them as a list, used by the list_stations tool handler.
    def get_all_stations() -> list[dict]: """Get all stations.""" stations = load_stations() return list(stations.values())

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/koizumikento/jma-data-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server