Skip to main content
Glama
weather-mcp

weather-mcp

by hammerZh-Z

weather_query_by_weekday

Read-onlyIdempotent

Query a city's weather for the next specified weekday to plan ahead, returning forecast details in Markdown or JSON.

Instructions

查询指定城市在下一个指定星期几的天气情况。

这个工具可以查询下一个指定星期几(如本周六、本周日)的天气预报。

Args: params (WeekdayQueryInput): 已验证的输入参数,包含: - city (str): 城市名称(例如:'北京', '上海', 'New York') - target_weekday (str): 目标星期几(例如:'Saturday', 'Sunday', 'Monday') - response_format (ResponseFormat): 输出格式,默认为markdown

Returns: str: 格式化的天气信息,包含与weather_query_by_days相同的详细信息

Examples: - 查询本周六的天气: city="北京", target_weekday="Saturday" - 查询本周日的天气: city="上海", target_weekday="Sunday" - 查询下周一的天气: city="Guangzhou", target_weekday="Monday"

Error Handling: - 如果城市名称或星期几无效,返回相应的验证错误 - 如果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_weekday"
  }
}

Input Schema

NameRequiredDescriptionDefault
paramsYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The annotations already declare readOnlyHint, openWorldHint, idempotentHint, and destructiveHint=false, so the safety profile is covered and the description only needs to add context. It does add value by disclosing error behavior (validation errors for invalid city or weekday, error messages on API failure) and by noting that the detail level matches weather_query_by_days. It does not cover rate limits or latency, but those are beyond the expected bar here.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The structure is conventional (purpose, Args, Returns, Examples, Error Handling), which aids scanning, but the first two sentences restate the same idea and the three examples largely repeat the parameter descriptions. It is front-loaded and readable, yet a third of the text is redundant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return-value explanation is not strictly required, and error handling is documented. However, for a tool whose entire premise is resolving 'the next occurrence of a weekday', the description leaves the week-boundary rule ambiguous (next vs. this Saturday) and says nothing about timezone or the reference date used for resolution, which is the one piece of behavior an agent genuinely cannot infer.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage registers as 0% at the top level (the single required 'params' wrapper is undocumented), so the description must compensate: it enumerates city with example values, target_weekday restricted to English weekday names, and response_format with its markdown default. The per-parameter examples clarify the expected string format in a way an agent can act on. It stops short of stating what happens with non-English weekday names or timezone assumptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence names a specific verb and resource: query the weather for a given city on the next occurrence of a specified weekday. It is distinguishable from weather_query_by_days in scope (weekday-targeted vs. day-range), though the description never states that distinction outright; it only says the output detail level matches that sibling's. A minor internal tension exists between '下一个指定星期几' (the next) and the example '查询本周六' (this Saturday), which blurs the temporal scope slightly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The use case is implied clearly by the restated purpose and the worked examples, but there is no explicit guidance on when to prefer this tool over weather_query_by_days, nor any exclusion or prerequisite. Mentioning that the sibling returns 'the same detail' hints at overlap without routing the agent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools