Skip to main content
Glama

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
NameRequiredDescriptionDefault
station_typeYes

Implementation Reference

  • 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}
  • 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]

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