Uses of Class
dev.langchain4j.mcp.client.DefaultMcpClient.Builder
Packages that use DefaultMcpClient.Builder
-
Uses of DefaultMcpClient.Builder in dev.langchain4j.mcp.client
Methods in dev.langchain4j.mcp.client that return DefaultMcpClient.BuilderModifier and TypeMethodDescriptionDefaultMcpClient.Builder.addListener(McpClientListener listener) Adds a listener to receive MCP client events.DefaultMcpClient.Builder.addListeners(List<McpClientListener> listeners) Adds multiple listeners to receive MCP client events.DefaultMcpClient.Builder.autoHealthCheck(boolean autoHealthCheck) Enables or disables the automatic health check feature.DefaultMcpClient.Builder.autoHealthCheckInterval(Duration interval) Sets the interval for the automatic health checks.static DefaultMcpClient.BuilderDefaultMcpClient.builder()DefaultMcpClient.Builder.cachePromptList(boolean cachePromptList) If set to true, the client will cache the prompt list obtained from the server until it's notified by the server that the prompts have changed.DefaultMcpClient.Builder.cacheResourceList(boolean cacheResourceList) If set to true, the client will cache the resource and resource template lists obtained from the server until it's notified by the server that the resources have changed.DefaultMcpClient.Builder.cacheToolList(boolean cacheToolList) If set to true, the client will cache the tool list obtained from the server until it's notified by the server that the tools have changed or until the cache is evicted.DefaultMcpClient.Builder.clientName(String clientName) Sets the name that the client will use to identify itself to the MCP server in the initialization message.DefaultMcpClient.Builder.clientVersion(String clientVersion) Sets the version string that the client will use to identify itself to the MCP server in the initialization message.DefaultMcpClient.Builder.initializationTimeout(Duration initializationTimeout) Sets the timeout for initializing the client.Sets a unique identifier for the client.DefaultMcpClient.Builder.listener(McpClientListener listener) Deprecated.DefaultMcpClient.Builder.logHandler(McpLogMessageHandler logHandler) Sets the log message handler for the client.DefaultMcpClient.Builder.metaSupplier(McpMetaSupplier metaSupplier) Sets a supplier of_metafields for MCP client requests and notifications.DefaultMcpClient.Builder.onResourceUpdated(BiConsumer<McpClient, String> onResourceUpdated) Sets a callback to be invoked when the server sends anotifications/resources/updatednotification for a subscribed resource.DefaultMcpClient.Builder.pingTimeout(Duration pingTimeout) The timeout to apply when waiting for a ping response.DefaultMcpClient.Builder.progressHandler(McpProgressHandler progressHandler) Sets the progress handler for the client.DefaultMcpClient.Builder.promptsTimeout(Duration promptsTimeout) Sets the timeout for prompt-related operations (listing prompts as well as rendering the contents of a prompt).DefaultMcpClient.Builder.protocolVersion(String protocolVersion) Sets the protocol version that the client will advertise in the initialization message.DefaultMcpClient.Builder.reconnectInterval(Duration reconnectInterval) The delay before attempting to reconnect after a failed connection.DefaultMcpClient.Builder.resourcesTimeout(Duration resourcesTimeout) Sets the timeout for resource-related operations (listing resources as well as reading the contents of a resource).Specify the initial set of roots that are available to the server upon its request.DefaultMcpClient.Builder.toolExecutionTimeout(Duration toolExecutionTimeout) Sets the timeout for tool execution.DefaultMcpClient.Builder.toolExecutionTimeoutErrorMessage(String toolExecutionTimeoutErrorMessage) Sets the error message to return when a tool execution times out.DefaultMcpClient.Builder.toolResultExtractor(McpToolResultExtractor toolResultExtractor) Sets the extractor used for MCP tool responses that return ordinaryCallToolResult.result.content[]items.DefaultMcpClient.Builder.transport(McpTransport transport) Sets the transport protocol to use for communicating with the MCP server.Constructors in dev.langchain4j.mcp.client with parameters of type DefaultMcpClient.Builder
DefaultMcpClient.Builder.addListener(McpClientListener)instead.