Use DescriptionAttribute and HasDefaultValue in server builder extensions (#46)
This commit is contained in:
parent
e187ebacc4
commit
33d2b0d762
1 changed files with 27 additions and 61 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue