Package dev.langchain4j.mcp
Class McpToolProvider
java.lang.Object
dev.langchain4j.mcp.McpToolProvider
- All Implemented Interfaces:
ToolProvider
A tool provider backed by one or more MCP clients.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic McpToolProvider.Builder
builder()
provideTools
(ToolProviderRequest request) Provides tools for the request to the LLM.
-
Method Details
-
provideTools
Description copied from interface:ToolProvider
Provides tools for the request to the LLM.- Specified by:
provideTools
in interfaceToolProvider
- Parameters:
request
-ToolProviderRequest
containsUserMessage
and chat memory id (seeMemoryId
).- Returns:
ToolProviderResult
contains tools that should be included in the request to the LLM.
-
builder
-