21 lines
732 B
C#
21 lines
732 B
C#
using ModelContextProtocol.Server;
|
||
using System.ComponentModel;
|
||
|
||
namespace LazyBear.MCP.Services;
|
||
|
||
[McpServerToolType]
|
||
public static class TradingTools
|
||
{
|
||
[McpServerTool, Description("Получить текущую цену актива")]
|
||
public static string GetCurrentPrice([Description("Тикер актива, например BTCUSD")] string ticker)
|
||
{
|
||
return $"Цена {ticker}: 50000 USD (фейковые данные)";
|
||
}
|
||
|
||
[McpServerTool, Description("Получить информацию о позиции")]
|
||
public static string GetPositionInfo([Description("ID позиции")] string positionId)
|
||
{
|
||
return $"Позиция {positionId}: Long BTC, PnL: +500 USD";
|
||
}
|
||
}
|