bvahdat commented on code in PR #19594:
URL: https://github.com/apache/camel/pull/19594#discussion_r2437216956
##########
components/camel-ai/camel-langchain4j-agent-api/src/main/java/org/apache/camel/component/langchain4j/agent/api/AgentWithMemory.java:
##########
@@ -61,6 +62,19 @@ private AiAgentWithMemoryService
createAiAgentService(ToolProvider toolProvider)
builder.toolProvider(toolProvider);
}
+ // MCP Clients - create MCP ToolProvider if MCP clients are configured
+ if (configuration.getMcpClients() != null &&
!configuration.getMcpClients().isEmpty()) {
Review Comment:
```suggestion
// import org.apache.camel.util.ObjectHelper
if (ObjectHelper.isNotEmpty(configuration.getMcpClients())) {
```
##########
components/camel-ai/camel-langchain4j-agent-api/src/main/java/org/apache/camel/component/langchain4j/agent/api/AgentWithoutMemory.java:
##########
@@ -57,6 +58,19 @@ private AiAgentWithoutMemoryService createAiAgentService(
builder.toolProvider(toolProvider);
}
+ // MCP Clients - create MCP ToolProvider if MCP clients are configured
+ if (configuration.getMcpClients() != null &&
!configuration.getMcpClients().isEmpty()) {
Review Comment:
```suggestion
// import org.apache.camel.util.ObjectHelper
if (ObjectHelper.isNotEmpty(configuration.getMcpClients())) {
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]