Skip to content

Commit 3837479

Browse files
jiimahodsp-ant
andauthored
fix: mention state code to avoid wrong arguments (modelcontextprotocol#847)
- I had an issue where the LLM continuously passed "California" to the tool instead of "CA" which caused very non-obvious errors. Co-authored-by: David Soria Parra <[email protected]>
1 parent c70451e commit 3837479

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/docs/develop/build-server.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1658,10 +1658,10 @@ namespace QuickstartWeatherServer.Tools;
16581658
[McpServerToolType]
16591659
public static class WeatherTools
16601660
{
1661-
[McpServerTool, Description("Get weather alerts for a US state.")]
1661+
[McpServerTool, Description("Get weather alerts for a US state code.")]
16621662
public static async Task<string> GetAlerts(
16631663
HttpClient client,
1664-
[Description("The US state to get alerts for.")] string state)
1664+
[Description("The US state code to get alerts for.")] string state)
16651665
{
16661666
using var jsonDocument = await client.ReadJsonDocumentAsync($"/alerts/active/area/{state}");
16671667
var jsonElement = jsonDocument.RootElement;

0 commit comments

Comments
 (0)