Class McpService.DummyMcpService
java.lang.Object
dev.langchain4j.agentic.internal.McpService.DummyMcpService
- All Implemented Interfaces:
McpService
- Enclosing interface:
McpService
-
Nested Class Summary
Nested classes/interfaces inherited from interface McpService
McpService.DummyMcpService, McpService.Provider -
Method Summary
Modifier and TypeMethodDescription<T> McpClientBuilder<T> mcpBuilder(Supplier<Object> mcpClientSupplier, Class<?> mcpClientType, Class<T> agentServiceClass) Creates the builder of an MCP client agent.methodToAgentExecutor(InternalAgent agent, Method method)
-
Method Details
-
mcpBuilder
public <T> McpClientBuilder<T> mcpBuilder(Supplier<Object> mcpClientSupplier, Class<?> mcpClientType, Class<T> agentServiceClass) Description copied from interface:McpServiceCreates the builder of an MCP client agent. The supplier returns theMcpClientand is invoked when the client is first needed, on the first invocation of the agent, because creating a client normally connects to the MCP server. Its declared return type is checked now, when the agent is built: it must be anMcpClient, a subtype, or a supertype such asObject, in which case the instance returned is checked when the client is created.- Specified by:
mcpBuilderin interfaceMcpService- Parameters:
mcpClientSupplier- the supplier of the client, wrapping the@McpClientSuppliermethodmcpClientType- the declared return type of that methodagentServiceClass- the interface of the agent
-
methodToAgentExecutor
- Specified by:
methodToAgentExecutorin interfaceMcpService
-