Improve WeatherTools.GetAlerts description in sample (#363)

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.
This commit is contained in:
Vladimir Negacevschi 2025-04-29 02:08:45 +01:00 • committed by GitHub
commit 86dd11a199
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -12,7 +12,7 @@ public sealed class WeatherTools
[McpServerTool, Description("Get weather alerts for a US state.")]
public static async Task<string> GetAlerts(
HttpClient client,
[Description("The US state to get alerts for.")] string state)
[Description("The US state to get alerts for. Use the 2 letter abbreviation for the state (e.g. NY).")] string state)
{
using var jsonDocument = await client.ReadJsonDocumentAsync($"/alerts/active/area/{state}");
var jsonElement = jsonDocument.RootElement;