csharp-sdk/samples/AspNetCoreMcpServer/Tools/EchoTool.cs

14 lines
325 B
C#

using ModelContextProtocol.Server;
using System.ComponentModel;
namespace AspNetCoreMcpServer.Tools;
[McpServerToolType]
public sealed class EchoTool
{
[McpServerTool, Description("Echoes the input back to the client.")]
public static string Echo(string message)
{
return "hello " + message;
}
}