BotSharp/src/Infrastructure/BotSharp.Abstraction/Agents/Models/MCPTool.cs

43 lines
791 B
C#
Raw Normal View History

namespace BotSharp.Abstraction.Agents.Models;
2025-04-01 01:59:19 +00:00
public class McpTool
{
2025-03-31 22:02:14 +00:00
public string Name { get; set; }
public string ServerId { get; set; }
public bool Disabled { get; set; }
2025-04-01 01:59:19 +00:00
public IEnumerable<McpFunction> Functions { get; set; } = [];
2025-04-01 01:59:19 +00:00
public McpTool()
{
}
2025-04-01 01:59:19 +00:00
public McpTool(
2025-03-31 22:02:14 +00:00
string name,
string serverId,
bool disabled = false,
2025-04-01 01:59:19 +00:00
IEnumerable<McpFunction>? functions = null)
{
2025-03-31 22:02:14 +00:00
Name = name;
ServerId = serverId;
Disabled = disabled;
Functions = functions ?? [];
}
public override string ToString()
{
2025-02-25 22:56:46 +00:00
return ServerId;
}
}
2025-04-01 01:59:19 +00:00
public class McpFunction
{
public string Name { get; set; }
2025-04-01 01:59:19 +00:00
public McpFunction(string name)
{
2025-03-31 22:02:14 +00:00
Name = name;
}
}