gnodet opened a new pull request, #24337:
URL: https://github.com/apache/camel/pull/24337

   ## Summary
   
   _Claude Code on behalf of Guillaume Nodet_
   
   Introduce a shared ToolRegistry to eliminate tool duplication between the 
MCP server and Agent REPL, surface DevConsole data as AI-accessible tools, add 
higher-level analysis capabilities, and create guided diagnostic/optimization 
prompts.
   
   ### Phase 1 (commit 2): Shared ToolRegistry infrastructure
   - Add `ToolDescriptor`, `ToolContext`, `ToolExecutionException`, and 
`ToolRegistry` in `camel-jbang-core` (`ai` package)
   - Central registry with 40+ shared tools organized by category (process, 
runtime status, runtime actions, catalog, examples)
   - Rewrite `AskTools` from ~995 to ~478 lines by delegating to the shared 
registry
   - Add 5 new catalog tools previously MCP-only: `catalog_dataformats`, 
`catalog_dataformat_doc`, `catalog_languages`, `catalog_language_doc`, 
`catalog_eip_doc`
   - Single source of truth: adding a tool once automatically surfaces it in 
both MCP and Agent REPL
   - Design document at `design/tui-mcp-agent-gaps.adoc`
   
   ### Phase 2 (commit 3): DevConsole data as AI tools
   - `get_circuit_breakers`: merged resilience4j/fault-tolerance/core circuit 
breaker state
   - `get_startup_steps`: startup recorder timing data
   - `get_datasources`: connection pool status (HikariCP/Agroal)
   - `sql_query`: execute SQL against application datasources
   - `get_spans`: OpenTelemetry trace spans
   - `get_metrics`: Micrometer counters, gauges, timers, distributions
   
   ### Phase 3 (commit 4): Analysis tools
   - `get_route_analysis`: route structure + dump with anti-pattern hints 
(error handling, DLC, timeouts, circuit breakers, idempotency, logging)
   - `get_eip_stats`: aggregated EIP/processor usage statistics with 
performance metrics
   - `detect_config_drift`: compare running route definitions with source files
   
   ### Phase 4 (commit 5): MCP diagnostic/optimization prompts
   - `camel_diagnose_route`: 7-step guided workflow for root cause analysis 
(gather context → check health → collect errors → inspect routes → check 
infrastructure → advanced diagnostics → synthesis)
   - `camel_optimize_route`: 6-step guided workflow for performance 
optimization (baseline → resources → structure → infrastructure → inspection → 
recommendations)
   
   ## Test plan
   
   - [x] 16 ToolRegistry tests pass (unique names, descriptions, executors, 
lookup, catalog without process, runtime requiring process, tool count, catalog 
tools, DevConsole tools, analysis tools, validation)
   - [x] 14 existing AskCliToolsTest pass (backward compatibility)
   - [x] Compilation verified for `camel-jbang-core` and `camel-jbang-mcp`
   - [ ] Manual verification with a running Camel application (DevConsole 
tools, SQL query, spans)
   - [ ] MCP server smoke test with Claude Desktop or similar client
   
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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]

Reply via email to