Refactor MCP Server and Complete it ...
This commit is contained in:
+8
-6
@@ -1,14 +1,16 @@
|
||||
using System.ComponentModel;
|
||||
using ModelContextProtocol.Server;
|
||||
|
||||
using xAiModels.Attributes;
|
||||
|
||||
namespace xAiMcpServer.Tools
|
||||
{
|
||||
[McpServerToolType]
|
||||
[XAiMcpToolType]
|
||||
public static class XEchoTools
|
||||
{
|
||||
[McpServerTool,
|
||||
Description("Echoes the message back to the client.")]
|
||||
public static string Echo(string message)
|
||||
[XAiMcpTool(Description = "Echoes the string back to the client give message in string")]
|
||||
public static string Echo(
|
||||
[XAiMcpToolParam(Description = "string value which specified message")]
|
||||
string message
|
||||
)
|
||||
{
|
||||
//
|
||||
var result = $"hello {message}";
|
||||
|
||||
Reference in New Issue
Block a user