Use DescriptionAttribute and HasDefaultValue in server builder extensions (#46)

This commit is contained in:
Stephen Toub 2025-03-09 06:16:00 -04:00 • committed by GitHub
commit 33d2b0d762
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,12 +1,13 @@
using McpDotNet.Server;
using System.ComponentModel;
namespace TestServerWithHosting.Tools;
[McpToolType]
public static class EchoTool
{
[McpTool(description: "Echoes the input back to the client.")]
public static string Echo([McpParameter(true)] string message)
[McpTool, Description("Echoes the input back to the client.")]
public static string Echo(string message)
{
return "hello " + message;
}