Table of Contents

Class McpToolAdapter

Namespace
Mythosia.AI.Mcp
Assembly
Mythosia.AI.Mcp.dll

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

connection McpConnection

An initialized MCP connection with discovered tools.

toolFilter Func<string, bool>

Optional filter to include only specific tools by name.

namePrefix string

Optional prefix added to each tool name to avoid collisions.

Returns

List<FunctionDefinition>