Skip to content

Normalize the weather servers' tool metadata and errors - #326

Open
a-akimov wants to merge 2 commits into
mainfrom
fix/268-normalize-servers-part-1
Open

a-akimov wants to merge 2 commits into
mainfrom
fix/268-normalize-servers-part-1

Conversation

@a-akimov

@a-akimov a-akimov commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Motivation and Context

Address issue #268, part 1

  • Rename the TypeScript tools to get_alerts and get_forecast, matching the other four servers and docs, and update the READMEs and AGENTS.md.
  • Give both tools the same title, description and input limits in all five servers: state exactly 2 characters, latitude -90..90, longitude -180..180.
  • Use one set of error messages everywhere, without raw HTTP bodies or exception text, and "No active alerts for {STATE}." when there are none.
  • Check for an empty forecast period list in the Rust server.
  • Note in the Rust and Python READMEs where those SDKs differ: rmcp doesn't check input limits, and the Python SDK prefixes tool errors.

How Has This Been Tested?

  • Automated unit / integration tests
  • Tested manually
  • Tested in a real application

Breaking Changes

N/a

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Test update (non-breaking change which adds or updates tests)
  • Refactoring (non-breaking change which makes things better)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • CI/build script update (update CI workflow or build scripts)

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • I have added automated tests for my change
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

Assisted by Claude Code, reviewed by me.

- Rename the TypeScript tools to get_alerts and get_forecast, matching
  the other four servers and docs, and update the READMEs and AGENTS.md.
- Give both tools the same title, description and input limits in all
  five servers: state exactly 2 characters, latitude -90..90,
  longitude -180..180.
- Use one set of error messages everywhere, without raw HTTP bodies or
  exception text, and "No active alerts for {STATE}." when there are none.
- Check for an empty forecast period list in the Rust server.
- Note in the Rust and Python READMEs where those SDKs differ: rmcp
  doesn't check input limits, and the Python SDK prefixes tool errors.

Assisted by Claude Code, reviewed by me.
Copilot AI balanced review requested due to automatic review settings December 3, 2026 17:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The Python weather server still omits explicit no-active-alerts text for an empty features list, leaving cross-server normalization incomplete.

1 open issue
What changed in this PR

This PR addresses part of #268 by aligning tool metadata and error handling across the five weather-server examples.

Changes:

  • Standardizes tool names, titles, descriptions, and declared input limits.
  • Normalizes error messages and adds Rust’s empty-forecast check.
  • Updates documentation for shared names and SDK differences.
File Description
weather-server-typescript/​src/​index.ts Renames tools and aligns metadata and errors.
weather-server-typescript/​README.md Documents underscore tool names.
weather-server-rust/​src/​main.rs Adds titles, input limits, and empty-forecast handling.
weather-server-rust/​README.md Explains input-validation limitations.
weather-server-ruby/​weather.rb Aligns metadata, limits, and error responses.
weather-server-python/​weather.py Adds titles and constrained parameter metadata.
weather-server-python/​README.md Documents SDK error prefixes.
weather-server-go/​main.go Adds explicit input schemas and normalizes errors.
README.md Documents shared tool names.
AGENTS.md Updates the language-convention example.

Review effort: Balanced

Comment thread weather-server-python/weather.py Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Malformed points responses can now raise an uncaught TypeError instead of returning the expected forecast error message because response structure validation falls outside the narrowed rescue.

1 open issue
1 resolved since last review

Review effort: Balanced

Comment thread weather-server-ruby/weather.rb Resolved
Copilot AI balanced review requested due to automatic review settings December 3, 2026 21:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the weather-server metadata and error-message alignment.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@a-akimov
a-akimov requested a review from a team December 3, 2026 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants