weather
Get current weather conditions for any city to plan activities or check local forecasts. This tool retrieves temperature, conditions, and other meteorological data.
Instructions
도시의 날씨 정보를 가져오기
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| city | Yes | 도시 이름 (예: 런던) |
Implementation Reference
- dist/tools/WeatherTool.js:13-21 (handler)The main handler function for the 'weather' tool. It takes a city name and returns mock weather data including temperature, condition, and humidity.async execute({ city }) { // 실제 API 호출로 대체해야 합니다 return { city, temperature: 22, condition: "맑음", humidity: 45, }; }
- dist/tools/WeatherTool.js:7-12 (schema)Input schema using Zod, requiring a 'city' string parameter with description.schema = { city: { type: z.string(), description: "도시 이름 (예: 런던)", }, };
- dist/tools/WeatherTool.js:3-4 (registration)Tool class definition extending MCPTool and setting the name to 'weather', effectively registering its identity.class WeatherTool extends MCPTool { name = "weather";