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