Skip to main content
Glama
kongyo2

Japanese Weather MCP Server

get_available_city_ids

Read-only

Retrieve a list of city IDs for Japanese cities to access weather forecast data from the Japanese Weather MCP Server.

Instructions

Get a list of available city IDs for Japanese cities

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'get_available_city_ids' tool. It iterates over CITY_IDS and formats a string listing all available city IDs.
    execute: async () => {
      let result = "šŸ™ļø Available Japanese City IDs:\n\n";
    
      Object.entries(CITY_IDS).forEach(([name, id]) => {
        result += `${name}: ${id}\n`;
      });
    
      result += "\nšŸ’” You can use these IDs with the get_weather_forecast tool.";
      result +=
        "\nšŸ“– For more city IDs, visit: https://weather.tsukumijima.net/primary_area.xml";
    
      return result;
    },
  • src/server.ts:91-113 (registration)
    Registration of the 'get_available_city_ids' tool using FastMCP's server.addTool method, including name, description, annotations, parameters schema, and inline handler.
    server.addTool({
      annotations: {
        openWorldHint: false, // This tool doesn't interact with external systems
        readOnlyHint: true, // This tool doesn't modify anything
        title: "Get Available City IDs",
      },
      description: "Get a list of available city IDs for Japanese cities",
      execute: async () => {
        let result = "šŸ™ļø Available Japanese City IDs:\n\n";
    
        Object.entries(CITY_IDS).forEach(([name, id]) => {
          result += `${name}: ${id}\n`;
        });
    
        result += "\nšŸ’” You can use these IDs with the get_weather_forecast tool.";
        result +=
          "\nšŸ“– For more city IDs, visit: https://weather.tsukumijima.net/primary_area.xml";
    
        return result;
      },
      name: "get_available_city_ids",
      parameters: z.object({}),
    });
  • Input schema for the tool, defined as an empty object using Zod (no parameters required).
    parameters: z.object({}),
  • Constant object CITY_IDS containing predefined city names and their corresponding IDs, used by the tool handler to generate the list of available cities.
    export const CITY_IDS = {
      // Fukuoka
      FUKUOKA: "400010",
      // Hiroshima
      HIROSHIMA: "340010",
      // Kawasaki
      KAWASAKI: "140020",
      // Kobe
      KOBE: "280010",
      // Kyoto
      KYOTO: "260010",
      // Nagoya
      NAGOYA: "230010",
      // Osaka
      OSAKA: "270000",
      // Sapporo
      SAPPORO: "016010",
      // Tokyo
      TOKYO: "130010",
      // Yokohama
      YOKOHAMA: "140010",
    } as const;
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, indicating this is a safe read operation with a closed set of results. The description adds value by specifying the geographic scope ('Japanese cities'), which isn't captured in annotations. However, it doesn't provide additional behavioral context like response format, pagination, or rate limits. No contradiction exists with 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 a single, clear sentence that efficiently communicates the core purpose without any wasted words. It's appropriately sized for a simple tool with no parameters, and the information is front-loaded with the essential action and resource.

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

Completeness3/5

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

For a zero-parameter read-only tool with annotations covering safety and scope, the description provides adequate context about what resource is returned. However, without an output schema, it doesn't specify the format of the returned list (e.g., array of strings/numbers), which could be helpful. The description is complete enough for basic understanding but lacks detail about the output structure.

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 tool has zero parameters, and the input schema has 100% description coverage (though empty). The description appropriately doesn't discuss parameters since none exist, which is correct for this case. No additional parameter semantics are needed, so this meets the baseline expectation for zero-parameter tools.

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 verb ('Get') and resource ('list of available city IDs for Japanese cities'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like 'get_weather_by_city_name' or 'get_weather_forecast', but the resource specificity (city IDs vs weather data) provides implicit distinction. The description avoids tautology by not just restating the tool name.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention that this tool might be used to obtain valid city IDs before calling weather-related sibling tools, nor does it specify any prerequisites or exclusions. The usage context is implied by the resource type but not explicitly stated.

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

Related 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/kongyo2/Japanese-Weather-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server