Files
xAiMcpServer/Tools/XEchoTools.cs
T
saherelm 37cba11e5d Add Standalone MCP ASP.NET Core Server
- تکمیل Program و Startup و ثبت سرویس‌های پایه، configuration، CORS، Swagger و
  احراز هویت/مجوز.
- افزودن McpController و StartupController.
- افزودن DI و ابزار XEchoTools.
- به‌روزرسانی appsettings، launchSettings و xAiMcpServer.csproj.
- حذف appsettings.Development.json از وضعیت کاری فعلی.
2026-11-04 17:51:49 +03:30

18 lines
413 B
C#

using System.ComponentModel;
using ModelContextProtocol.Server;
namespace xAiMcpServer.Tools
{
[McpServerToolType]
public static class XEchoTools
{
[McpServerTool,
Description("Echoes the message back to the client.")]
public static string Echo(string message)
{
//
var result = $"hello {message}";
return result;
}
}
}