- تکمیل Program و Startup و ثبت سرویسهای پایه، configuration، CORS، Swagger و احراز هویت/مجوز. - افزودن McpController و StartupController. - افزودن DI و ابزار XEchoTools. - بهروزرسانی appsettings، launchSettings و xAiMcpServer.csproj. - حذف appsettings.Development.json از وضعیت کاری فعلی.
18 lines
413 B
C#
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;
|
|
}
|
|
}
|
|
} |