Skip to main content
Glama

get_current_weather

Retrieve current weather observations from AMeDAS stations across Japan, including temperature, humidity, pressure, wind, and precipitation data for specific locations or all stations.

Instructions

Get current weather observation data from AMeDAS stations.

Args: station_code: Station code (e.g., '44132' for Tokyo). If not specified, returns data for all stations.

Returns: Weather data including temperature, humidity, pressure, wind, precipitation, etc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
station_codeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'get_current_weather' tool. It fetches current weather data from AMeDAS stations using fetch_amedas_data, optionally for a specific station code, and formats the response.
    @mcp.tool()
    async def get_current_weather(
        station_code: Optional[str] = None,
    ) -> dict:
        """Get current weather observation data from AMeDAS stations.
    
        Args:
            station_code: Station code (e.g., '44132' for Tokyo).
                          If not specified, returns data for all stations.
    
        Returns:
            Weather data including temperature, humidity, pressure, wind, precipitation, etc.
        """
        weather_data = await fetch_amedas_data(station_code)
    
        if station_code:
            station_info = get_station(station_code)
            if station_info and station_code in weather_data["stations"]:
                weather_data["station_info"] = station_info
                weather_data["weather"] = weather_data["stations"][station_code]
                del weather_data["stations"]
    
        return weather_data
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses that the tool retrieves data (a read operation) and specifies the data source (AMeDAS stations), which is useful. However, it lacks details on behavioral traits such as rate limits, authentication needs, or potential errors (e.g., invalid station codes). The description doesn't contradict annotations, but it's only moderately informative given the absence of structured annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and front-loaded: the first sentence states the core purpose, followed by clear 'Args' and 'Returns' sections. Every sentence adds value without redundancy, making it efficient and easy to parse. There's no wasted text, and the bullet-like format enhances readability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (1 parameter, no annotations, but with an output schema), the description is fairly complete. It covers the purpose, parameter usage, and return data types. The output schema exists, so the description doesn't need to detail return values. However, it could improve by mentioning sibling tools or edge cases, but it's adequate for basic use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage, so the description must compensate. It adds meaningful semantics: it explains that 'station_code' is a code (e.g., '44132' for Tokyo) and clarifies that omitting it returns data for all stations. This goes beyond the schema's basic type information, providing practical context. However, it doesn't detail format constraints or validation rules, keeping it from a perfect score.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get current weather observation data from AMeDAS stations.' It specifies the verb ('Get'), resource ('current weather observation data'), and source ('AMeDAS stations'), making the action clear. However, it doesn't explicitly differentiate from siblings like 'get_weather_by_location' or 'get_weather_time_series', which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage through the parameter explanation: station_code is optional, and if omitted, returns data for all stations. This provides some context for when to use the tool (e.g., for a specific station vs. all stations). However, it doesn't explicitly guide when to choose this tool over alternatives like 'get_weather_by_location' or 'get_forecast', leaving usage decisions partially inferred.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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