Package dev.langchain4j.mcp
Class McpToolExecutor
java.lang.Object
dev.langchain4j.mcp.McpToolExecutor
- All Implemented Interfaces:
ToolExecutor
- Since:
- 1.4.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute
(ToolExecutionRequest executionRequest, Object memoryId) Executes a tool requests.
-
Constructor Details
-
McpToolExecutor
-
-
Method Details
-
execute
Description copied from interface:ToolExecutor
Executes a tool requests.- Specified by:
execute
in interfaceToolExecutor
- Parameters:
executionRequest
- The tool execution request. Contains tool name and arguments.memoryId
- The ID of the chat memory. SeeMemoryId
for more details.- Returns:
- The result of the tool execution that will be sent to the LLM.
-