Class McpToolProvider.Builder

java.lang.Object
dev.langchain4j.mcp.McpToolProvider.Builder
Enclosing class:
McpToolProvider

public static class McpToolProvider.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • mcpClients

      public McpToolProvider.Builder mcpClients(List<McpClient> mcpClients)
      The list of MCP clients to use for retrieving tools.
    • mcpClients

      public McpToolProvider.Builder mcpClients(McpClient... mcpClients)
      The list of MCP clients to use for retrieving tools.
    • failIfOneServerFails

      public McpToolProvider.Builder failIfOneServerFails(boolean failIfOneServerFails)
      If this is true, then the tool provider will throw an exception if it fails to list tools from any of the servers. If this is false (default), then the tool provider will ignore the error and continue with the next server.
    • build

      public McpToolProvider build()