Skip to content

Conversation

@vladnega
Copy link
Contributor

Make the LLM pass the 2 letter abbreviation for the state (e.g. NY) when calling GetAlerts, instead of its full name.

Motivation and Context

The latest api.weather.gov API spec requires to pass a 2 letter identifier for the state when calling the /alerts/active/area/ endpoint. Passing the full state name no longer works.

How Has This Been Tested?

I called the MCP server from Claude Desktop, asking it the following:

  1. get the weather for sacramento => this prompted it to call GetForecast endpoint
  2. any alerts I should be aware of? => this prompted it to call GetAlerts endpoint

Breaking Changes

No. It's just updating the sample code.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

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

Additional context

N/A

The latest *api.weather.gov* API spec requires to use the 2 letter abbreviation for the state (e.g. NY), when getting the alerts for a state.
@halter73
Copy link
Contributor

Thanks!

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