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

   ## Summary
   
   Add 6 new MCP tools to the Camel TUI MCP server that provide structured JSON 
data access for AI agents, eliminating the need to parse rendered screen text:
   
   - **tui_get_table** — Returns the currently visible table data as structured 
JSON with typed values. Supports optional tab parameter to get data from any 
tab.
   - **tui_action** — Invokes a TUI action by name (e.g. `reset-stats`, 
`screenshot`, `doctor`), bypassing fragile F2 key sequences.
   - **tui_get_log** — Returns recent log lines as structured data with 
optional limit, message filter, and level filter.
   - **tui_get_errors** — Returns structured error data including routeId, 
exchangeId, exception details, stack trace, body, and headers.
   - **tui_get_diagram** — Returns the route topology diagram as text 
(ASCII/Unicode art).
   - **tui_send_message** — Sends a message to a Camel endpoint in the selected 
integration via file-based IPC.
   
   ### Implementation
   
   - Added `getTableDataAsJson()` default method to `MonitorTab` interface
   - Implemented in 9 tab classes: OverviewTab, RoutesTab, EndpointsTab, 
HealthTab, ConsumersTab, ErrorsTab, InflightTab, LogTab, DiagramTab
   - Added `executeActionByName(String)` to `ActionsPopup` for safe action 
dispatch
   - Added accessor methods to `CamelMonitor` (getTableData, executeAction, 
getLogData, getDiagramData, sendMessage)
   - Added `sendMessage()` to `RuntimeHelper` for file-based IPC message sending
   - Added `getLines()` getter to `DiagramSupport` for diagram text access
   
   ## Test plan
   
   - [ ] Build: `cd dsl/camel-jbang/camel-jbang-plugin-tui && mvn install 
-DskipTests`
   - [ ] Run `camel tui monitor --mcp` with an integration running
   - [ ] Test `tui_get_table` on Routes, Endpoints, Overview, Health tabs — 
verify JSON structure
   - [ ] Test `tui_action` with `reset-stats`, `screenshot` — verify action 
executes
   - [ ] Test `tui_get_log` with filter and level — verify filtered results
   - [ ] Test `tui_get_errors` — verify error details returned
   - [ ] Test `tui_get_diagram` — verify ASCII diagram returned
   - [ ] Test `tui_send_message` with `direct:` endpoint — verify message 
delivered
   
   _Claude Code on behalf of Claus Ibsen_


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