天气查询
weather_query查询指定城市的当前天气与未来数日预报(温度/天气现象/风力/湿度)。Example: {"city":"北京","days":3}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| city | Yes | 城市名,如 北京、上海、深圳、Hangzhou | |
| days | No | 预报天数 1-7,默认 1(仅当前天气) |
weather_query查询指定城市的当前天气与未来数日预报(温度/天气现象/风力/湿度)。Example: {"city":"北京","days":3}
| Name | Required | Description | Default |
|---|---|---|---|
| city | Yes | 城市名,如 北京、上海、深圳、Hangzhou | |
| days | No | 预报天数 1-7,默认 1(仅当前天气) |
Changes observed during successful MCP inspections.
Input schema / examplesAdded value: +[
+ {
+ "city": "北京",
+ "days": 3
+ }
+]Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds value by listing which weather fields are returned, but it does not mention data freshness, source, rate limits, or error behavior for unknown cities.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single front-loaded sentence states the capability and the returned metrics, followed by an illustrative example. The example largely duplicates the schema's examples block, which is the only redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a two-parameter read-only tool with a fully documented schema, the description covers purpose and the shape of the return values, which matters because no output schema exists. Minor gaps are freshness/error semantics, which are not essential for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% and both parameters are fully documented, which sets a baseline of 3. The description adds a concrete worked example ({"city":"北京","days":3}) that shows the shape of a real call, giving a small boost above baseline.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Names a specific verb (查询) and resource (指定城市的当前天气与未来数日预报) and enumerates the returned metrics (温度/天气现象/风力/湿度). Sibling tools are all unrelated utilities, so no differentiation is needed; an agent can tell instantly what this does.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Implies usage through the `days` example and the phrase 未来数日预报, so an agent can infer that days=1 yields current weather and larger values yield forecasts. However, there is no explicit statement of when to use this versus other inputs or of any limits beyond what the schema states.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Add one secure layer between your agents and this server.