You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "davsclaus (via GitHub)" <gi...@apache.org> on 2026/07/02 05:58:16 UTC

Re: [PR] CAMEL-23873: Introduce shared ToolRegistry for AI tools [camel]

davsclaus commented on code in PR #24337:
URL: https://github.com/apache/camel/pull/24337#discussion_r3510793825


##########
dsl/camel-jbang/camel-jbang-mcp/src/main/java/org/apache/camel/dsl/jbang/core/commands/mcp/RuntimeTools.java:
##########
@@ -292,11 +311,10 @@ public JsonObject camel_runtime_route_topology(
             @ToolArg(description = NAME_OR_PID_DESC) String nameOrPid,
             @ToolArg(description = "Include live metrics (message counts, throughput) on nodes and edges") Boolean metric,
             @ToolArg(description = "Include external systems (databases, messaging brokers, etc.) as nodes") Boolean external) {
-        RuntimeService.ProcessInfo p = runtimeService.findSingleProcess(nameOrPid);
-        return runtimeService.executeAction(p.pid(), "route-topology", root -> {
-            root.put("metric", metric != null && metric ? "true" : "false");
-            root.put("external", external != null && external ? "true" : "false");
-        });
+        Map<String, String> args = new HashMap<>();
+        args.put("metric", metric == null || metric ? "true" : "false");

Review Comment:
   Minor: this changes the default behavior when `metric` / `external` are not provided by the MCP client.
   
   **Before:** `metric != null && metric` → null defaults to **false**
   **After:** `metric == null || metric` → null defaults to **true**
   
   Same for `external` on the next line. Is this intentional? If so, might be worth a note in the PR description since existing MCP clients relying on the old defaults will see different results.



-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org