Class McpClientTool
- Namespace
- OllamaSharp.ModelContextProtocol.Server
- Assembly
- OllamaSharp.ModelContextProtocol.dll
Represents a tool to interact with an MCP server.
public class McpClientTool : Tool, IAsyncInvokableTool
- Inheritance
-
McpClientTool
- Implements
- Inherited Members
Constructors
McpClientTool(McpClientTool, IMcpClient)
Initializes a new instance with metadata about the original method.
public McpClientTool(McpClientTool mcpTool, IMcpClient client)
Parameters
mcpToolMcpClientToolclientIMcpClient
Methods
InvokeMethodAsync(IDictionary<string, object?>?)
Invokes the method asynchronously with the specified arguments.
public Task<object?> InvokeMethodAsync(IDictionary<string, object?>? args)
Parameters
argsIDictionary<string, object>The arguments to pass to the method.