Skip to main content
Glama

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

Implementation Reference

  • 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,
        }
  • 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())

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