Refactor MCP Server and Complete it ...

This commit is contained in:
2026-11-05 10:44:17 +03:30
parent 37cba11e5d
commit c686750e2a
5 changed files with 32 additions and 53 deletions
+8 -6
View File
@@ -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}";