Skip to main content
Glama

get_tokyo_wbgt_forecast

Retrieve WBGT heat index forecasts for Tokyo locations to assess heat stroke risk and plan outdoor activities safely.

Instructions

東京都のWBGT(暑さ指数)予測値を取得します

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
locationNo東京都内の観測地点(tokyo, hachioji, fuchu, nerima, ome, ogochi, edogawa)tokyo

Implementation Reference

  • The handler function that executes the tool logic for get_tokyo_wbgt_forecast. It calls the WBGTService to fetch data and returns it as JSON string in MCP content format.
    private async handleGetTokyoWBGTForecast(location: string): Promise<any> { const data = await this.wbgtService.getTokyoWBGTForecast(location as TokyoLocation); return { content: [ { type: "text", text: JSON.stringify(data, null, 2), }, ], }; }
  • Input schema definition for the get_tokyo_wbgt_forecast tool, specifying the location parameter with enum values.
    inputSchema: { type: "object", properties: { location: { type: "string", description: "東京都内の観測地点(tokyo, hachioji, fuchu, nerima, ome, ogochi, edogawa)", enum: ["tokyo", "hachioji", "fuchu", "nerima", "ome", "ogochi", "edogawa"], default: "tokyo" } }, },
  • src/index.ts:38-52 (registration)
    Registration of the get_tokyo_wbgt_forecast tool in the ListTools response, including name, description, and input schema.
    { name: "get_tokyo_wbgt_forecast", description: "東京都のWBGT(暑さ指数)予測値を取得します", inputSchema: { type: "object", properties: { location: { type: "string", description: "東京都内の観測地点(tokyo, hachioji, fuchu, nerima, ome, ogochi, edogawa)", enum: ["tokyo", "hachioji", "fuchu", "nerima", "ome", "ogochi", "edogawa"], default: "tokyo" } }, }, },
  • Supporting service method that implements the core logic: maps location to ID, fetches CSV from API, parses it using utility.
    async getTokyoWBGTForecast(location: TokyoLocation): Promise<WBGTData> { const locationId = LOCATION_ID_MAP[location]; if (!locationId) { throw new Error(`Unknown location: ${location}. Available: ${Object.keys(LOCATION_ID_MAP).join(", ")}`); } const url = `${WBGT_API_BASE_URLS.forecast}yohou_${locationId}.csv`; try { const response = await fetch(url); if (!response.ok) { throw new Error(`HTTP error! status: ${response.status}`); } const csvData = await response.text(); return parseWBGTForecastCSV(csvData, location); } catch (error) { throw new Error(`Failed to fetch WBGT data: ${error instanceof Error ? error.message : String(error)}`); } }

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