weather_query_by_days
Query a city's weather forecast for today or any day up to 16 days ahead, returning conditions, temperatures, precipitation, wind, humidity, UV index, and sunrise/sunset in Markdown or JSON.
Instructions
查询指定城市在指定天数后的天气情况。
这个工具可以查询未来16天内任意一天的天气预报,包括温度、降水、风力等信息。
Args: params (WeatherQueryInput): 已验证的输入参数,包含: - city (str): 城市名称(例如:'北京', '上海', 'New York', 'London') - days_later (int): 未来的天数(0=今天, 1=明天, 2=后天, 范围:0-16) - response_format (ResponseFormat): 输出格式,默认为markdown
Returns: str: 格式化的天气信息
成功响应包含:
- 天气状况(晴朗、多云、雨等)
- 温度范围(最低/最高温度)
- 体感温度
- 降水量和降水概率
- 风速
- 湿度
- 紫外线指数
- 日出日落时间
错误响应:
"Error: <错误信息>"Examples: - 查询明天的天气: city="北京", days_later=1 - 查询后天的天气: city="上海", days_later=2 - 查询7天后的天气: city="New York", days_later=7
Error Handling: - 如果城市名称无效,返回城市未找到错误 - 如果天数超出范围(0-16),返回验证错误 - 如果API请求失败,返回相应的错误信息
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"params": "<params>"
},
"name": "weather_query_by_days"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |