Package dev.langchain4j.mcp
Class McpToolProvider.Builder
java.lang.Object
dev.langchain4j.mcp.McpToolProvider.Builder
- Enclosing class:
McpToolProvider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
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.filter
(BiPredicate<McpClient, ToolSpecification> mcpToolsFilter) The predicate to filter MCP provided tools.filterToolNames
(String... toolNames) Filter MCP provided tools with a specific name.mcpClients
(McpClient... mcpClients) The list of MCP clients to use for retrieving tools.mcpClients
(List<McpClient> mcpClients) The list of MCP clients to use for retrieving tools.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
mcpClients
The list of MCP clients to use for retrieving tools. -
mcpClients
The list of MCP clients to use for retrieving tools. -
filter
The predicate to filter MCP provided tools. -
filterToolNames
Filter MCP provided tools with a specific name. -
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
-