get_all_tokyo_locations
Retrieve WBGT (heat index) forecast data for all observation points across Tokyo to support heat stroke prevention planning and safety measures.
Instructions
東京都内の全WBGT観測地点の予測値を一括取得します
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:138-149 (handler)MCP tool handler function that invokes the WBGT service to get all Tokyo locations data and formats it as MCP response content with JSON string.private async handleGetAllTokyoLocations(): Promise<any> { const data = await this.wbgtService.getAllTokyoLocations(); return { content: [ { type: "text", text: JSON.stringify(data, null, 2), }, ], }; }
- src/index.ts:53-60 (schema)Tool schema definition in the ListTools response, specifying name, description, and empty input schema (no parameters).{ name: "get_all_tokyo_locations", description: "東京都内の全WBGT観測地点の予測値を一括取得します", inputSchema: { type: "object", properties: {}, }, },
- src/index.ts:94-95 (registration)Registration of the tool handler in the CallToolRequest switch statement, dispatching calls to handleGetAllTokyoLocations.case "get_all_tokyo_locations": return await this.handleGetAllTokyoLocations();
- src/wbgt-service.ts:36-50 (helper)Core helper function in WBGTService that fetches the all-Tokyo WBGT forecast CSV from API and parses it into WBGTData array.async getAllTokyoLocations(): Promise<WBGTData[]> { const url = `${WBGT_API_BASE_URLS.forecast}yohou_tokyo.csv`; try { const response = await fetch(url); if (!response.ok) { throw new Error(`HTTP error! status: ${response.status}`); } const csvData = await response.text(); return parseAllTokyoCSV(csvData); } catch (error) { throw new Error(`Failed to fetch all Tokyo WBGT data: ${error instanceof Error ? error.message : String(error)}`); } }