Skip to main content
Glama
yukit7s
by yukit7s

get_tokyo_realtime_data

Retrieve measured WBGT values from Tokyo observation points to monitor heat stress conditions and support heat stroke prevention decisions.

Instructions

東京都の実測WBGT値を取得します(実測地点のみ)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yearNo年(4桁)
monthNo月(1-12)

Implementation Reference

  • MCP tool handler function that invokes the WBGT service to retrieve Tokyo realtime data and returns it as JSON.
    private async handleGetTokyoRealtimeData(year: number, month: number): Promise<any> {
      const data = await this.wbgtService.getTokyoRealtimeData(year, month);
      
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(data, null, 2),
          },
        ],
      };
    }
  • src/index.ts:61-81 (registration)
    Tool registration in the ListTools response, defining the tool name, description, and input schema for year and month.
    {
      name: "get_tokyo_realtime_data",
      description: "東京都の実測WBGT値を取得します(実測地点のみ)",
      inputSchema: {
        type: "object",
        properties: {
          year: {
            type: "number",
            description: "年(4桁)",
            default: new Date().getFullYear()
          },
          month: {
            type: "number",
            description: "月(1-12)",
            minimum: 1,
            maximum: 12,
            default: new Date().getMonth() + 1
          }
        },
      },
    }
  • TypeScript interface defining the output structure for realtime WBGT data.
    export interface WBGTRealtimeData {
      location: string;
      prefecture: string;
      data: WBGTRealtimeEntry[];
    }
  • Service method that fetches realtime WBGT CSV from the API URL constructed with year and month, then parses it.
      async getTokyoRealtimeData(year: number, month: number): Promise<WBGTRealtimeData> {
        const monthStr = month.toString().padStart(2, '0');
        const url = `${WBGT_API_BASE_URLS.realtime}Tokyo_${year}${monthStr}.csv`;
        
        try {
          const response = await fetch(url);
          if (!response.ok) {
            throw new Error(`HTTP error! status: ${response.status}`);
          }
          
          const csvData = await response.text();
          return parseRealtimeCSV(csvData);
        } catch (error) {
          throw new Error(`Failed to fetch realtime WBGT data: ${error instanceof Error ? error.message : String(error)}`);
        }
      }
    }
  • Utility function that parses the realtime CSV data into structured WBGTRealtimeData, calculating status and limiting to latest 24 hours.
    export function parseRealtimeCSV(csvData: string): WBGTRealtimeData {
      const lines = csvData.split('\n').filter(line => line.trim());
      
      if (lines.length < 2) {
        throw new Error("Invalid CSV format");
      }
    
      const realtimeData: WBGTRealtimeEntry[] = [];
    
      for (let i = 1; i < lines.length; i++) {
        const values = lines[i].split(',');
        if (values.length >= 3) {
          const date = values[0];
          const time = values[1];
          const wbgt = parseFloat(values[2]);
    
          realtimeData.push({
            datetime: `${date} ${time}`,
            wbgt: isNaN(wbgt) ? null : wbgt,
            status: getWBGTStatus(wbgt)
          });
        }
      }
    
      return {
        location: "東京(実測地点)",
        prefecture: "東京都",
        data: realtimeData.slice(-24) // 最新24時間のデータ
      };
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states what data is retrieved but doesn't disclose behavioral traits like whether this is a read-only operation, what permissions might be needed, rate limits, response format, or error conditions. For a data retrieval tool with no annotations, this is insufficient.

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?

Single sentence in Japanese that's front-loaded with the core purpose. No wasted words or redundant information. Appropriately sized for a simple data retrieval tool.

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

Completeness2/5

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

For a data retrieval tool with no annotations and no output schema, the description is incomplete. It doesn't explain what format the WBGT data returns in, what time granularity (hourly/daily), whether it includes location details, or how to interpret the values. The schema covers parameters well, but overall context is lacking.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents both parameters (year and month) with descriptions, constraints, and defaults. The description doesn't add any parameter-specific information beyond what's in the schema, maintaining the baseline 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 verb ('取得します' - get/retrieve) and resource ('東京都の実測WBGT値' - Tokyo's measured WBGT values), and specifies scope ('実測地点のみ' - measured locations only). It doesn't explicitly differentiate from sibling tools, but the focus on '実測' (measured) versus 'forecast' in one sibling provides some implicit distinction.

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?

No explicit guidance on when to use this tool versus alternatives like 'get_tokyo_wbgt_forecast' or 'get_all_tokyo_locations'. The description mentions '実測地点のみ' which implies measured data only, but doesn't state when to choose measured over forecast data or location listings.

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/yukit7s/cc-get-wbgt'

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