Repository navigation
Conversation
Both tools only read data from an outside service (the NWS API), so every server now declares readOnlyHint: true and openWorldHint: true on get_alerts and get_forecast. destructiveHint: false and idempotentHint: true are set explicitly as well. The Go SDK always sends idempotentHint, and the Ruby gem always sends all four hints with defaults meant for tools that write (destructive, not idempotent). Setting all four keeps the five servers' tools/list output identical. The test client now fails a server whose tools don't carry these four annotations. Each server README gets a short section on what the hints mean to a host. Closes #271 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NkL34oWhufSSqj9FbPx5dr
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are blocking the tool-annotation updates across the five weather servers.
No open issues 🎉
What changed in this PR
Adds consistent tool annotations across all five weather servers, addressing #271 by describing both tools as read-only consumers of the external NWS API.
Changes:
- Explicitly sets all four annotation hints on both tools in each server.
- Updates the shared test client to reject missing or incorrect annotation values.
- Documents the hints and their trust limitations in each server README.
| File | Description |
|---|---|
weather-server-typescript/src/index.ts |
Applies shared annotations to both tools. |
weather-server-typescript/README.md |
Explains annotation values and host trust. |
weather-server-rust/src/main.rs |
Adds annotations to both tool macros. |
weather-server-rust/README.md |
Explains annotation values and host trust. |
weather-server-ruby/weather.rb |
Applies explicit shared annotations, overriding gem defaults. |
weather-server-ruby/README.md |
Explains annotation values and host trust. |
weather-server-python/weather.py |
Supplies shared ToolAnnotations to both tool decorators. |
weather-server-python/README.md |
Explains annotation values and host trust. |
weather-server-go/README.md |
Explains annotation values and host trust. |
weather-server-go/main.go |
Adds an annotation helper used by both tools. |
tests/helpers/mcp-test-client.ts |
Validates all four expected hints on every listed tool. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Closes #271
Both tools only read data from an outside service (the NWS API), so every server now declares
readOnlyHint: trueandopenWorldHint: trueonget_alertsandget_forecast.destructiveHint: falseandidempotentHint: trueare set explicitly as well. The Go SDK always sendsidempotentHint, and the Ruby gem always sends all four hints with defaults meant for tools that write (destructive, not idempotent). Setting all four keeps the five servers' tools/list output identical.How Has This Been Tested?
The test client now fails a server whose tools don't carry these four annotations. Each server README gets a short section on what the hints mean to a host.
Breaking Changes
N/a
Types of changes
Checklist
Additional context
Assisted by Claude Code, reviewed by me.