Class McpToolAdapter
Converts MCP tools into Mythosia.AI FunctionDefinition instances, bridging MCP tool schemas to the existing function calling infrastructure.
public static class McpToolAdapter
- Inheritance
-
McpToolAdapter
- Inherited Members
Methods
ToFunctionDefinitions(McpConnection, Func<string, bool>?, string?)
Converts all tools from an McpConnection into FunctionDefinition list. Each function's handler delegates to CallToolAsync(string, Dictionary<string, object>?, CancellationToken).
public static List<FunctionDefinition> ToFunctionDefinitions(McpConnection connection, Func<string, bool>? toolFilter = null, string? namePrefix = null)
Parameters
connectionMcpConnectionAn initialized MCP connection with discovered tools.
toolFilterFunc<string, bool>Optional filter to include only specific tools by name.
namePrefixstringOptional prefix added to each tool name to avoid collisions.