java.lang.Object
com.mulesoft.connectors.mcp.internal.client.operation.tool.ClientToolOperations

@Throws({JsonRpcErrorTypeProvider.class,BasicOperationErrorTypeProvider.class}) public class ClientToolOperations extends Object
Client operations to deal with tools
Since:
0.1.0
  • Constructor Details

    • ClientToolOperations

      public ClientToolOperations()
  • Method Details

    • callTool

      @DisplayName("MCP Client - Call Tool") public void callTool(@Connection io.modelcontextprotocol.client.McpAsyncClient client, @MetadataKeyId(ClientToolKeyResolver.class) String toolName, @Content(primary=true) @TypeResolver(ClientToolInputTypeResolver.class) Map<String,Object> arguments, @ParameterGroup(name="Request") RequestParameterGroup requestParameters, org.mule.runtime.extension.api.runtime.process.CompletionCallback<CallToolResponse,Void> completionCallback)
      Invokes a tool in a remote MCP server
      Parameters:
      client - the MCP client
      toolName - the name of the tool to be invoked
      arguments - the tool's input arguments
      completionCallback - the completion callback
    • listTools

      @DisplayName("MCP Client - List Tools") public org.mule.runtime.extension.api.runtime.streaming.PagingProvider<io.modelcontextprotocol.client.McpAsyncClient,ToolMetadata> listTools()
      Lists all the available tools in the remote MCP server