Skip to main content
Glama

get_station_info

Retrieve detailed AMeDAS station information including name, location, and type using station codes from the Japan Meteorological Agency's network.

Instructions

Get AMeDAS station information by station code.

Args: code: Station code (e.g., '44132' for Tokyo)

Returns: Station information including name, location, and type

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes

Implementation Reference

  • The main handler function for the 'get_station_info' tool. It is registered via @mcp.tool() decorator and implements the core logic by calling the get_station helper, handling the case where the station is not found.
    @mcp.tool() async def get_station_info(code: str) -> dict: """Get AMeDAS station information by station code. Args: code: Station code (e.g., '44132' for Tokyo) Returns: Station information including name, location, and type """ station = get_station(code) if station: return station return {"error": f"Station with code '{code}' not found."}
  • Supporting helper function that loads the stations data cache and retrieves the station dictionary by its code.
    def get_station(code: str) -> Optional[dict]: """Get station by code.""" stations = load_stations() return stations.get(code)

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