Skip to main content
Glama

search_stations

Find AMeDAS weather stations by name using Japanese, Kana, or English queries to access JMA weather data.

Instructions

Search AMeDAS stations by name (Japanese, Kana, or English).

Args: name: Station name to search

Returns: List of matching stations

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes

Implementation Reference

  • MCP tool handler for 'search_stations'. Decorated with @mcp.tool() for registration. Executes search using helper function and returns formatted results.
    @mcp.tool() async def search_stations(name: str) -> dict: """Search AMeDAS stations by name (Japanese, Kana, or English). Args: name: Station name to search Returns: List of matching stations """ stations = search_stations_by_name(name) return {"count": len(stations), "stations": stations}
  • Core helper function implementing the station name search logic with substring matching on Japanese, Kana, and English names.
    def search_stations_by_name(name: str) -> list[dict]: """Search stations by name (Japanese, Kana, or English).""" stations = load_stations() results = [] name_lower = name.lower() for station in stations.values(): if (name in station["name"]["ja"] or name in station["name"]["kana"] or name_lower in station["name"]["en"].lower()): results.append(station) return results
  • FastMCP decorator registering the 'search_stations' function as a tool.
    @mcp.tool()

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