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/06/03 10:50:08 UTC

[PR] CAMEL-23679: camel-tui - Add structured data access MCP tools [camel]

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

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


Re: [PR] CAMEL-23679: camel-tui - Add structured data access MCP tools [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #23734:
URL: https://github.com/apache/camel/pull/23734#issuecomment-4613000263

   :star2: Thank you for your contribution to the Apache Camel project! :star2:
     :robot: CI automation will test this PR automatically.
   
     :camel: Apache Camel Committers, please review the following items:
   
     * First-time contributors **require MANUAL approval** for the GitHub Actions to run
     * You can use the command `/component-test (camel-)component-name1 (camel-)component-name2..` to request a test from the test bot although they are normally detected and executed by CI.
     * You can label PRs using `skip-tests` and `test-dependents` to fine-tune the checks executed by this PR.
     * Build and test logs are available in the summary page. **Only** [Apache Camel committers](https://camel.apache.org/community/team/#committers) have access to the summary.
     
     :warning: Be careful when sharing logs. Review their contents before sharing them publicly.


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


Re: [PR] CAMEL-23679: camel-tui - Add structured data access MCP tools [camel]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #23734:
URL: https://github.com/apache/camel/pull/23734#issuecomment-4613677016

   <!-- ci-tested-modules -->
   :test_tube: **CI tested the following changed modules:**
   
   - `dsl/camel-jbang/camel-jbang-core`
   - `dsl/camel-jbang/camel-jbang-plugin-tui`
   
   :warning: **Some tests are disabled on GitHub Actions** (`@DisabledIfSystemProperty(named = "ci.env.name")`) and require manual verification:
   
   - `dsl/camel-jbang/camel-jbang-core`: 1 test(s) disabled on GitHub Actions
   
   :bulb: **Manual integration tests recommended:**
   
   > You modified `dsl/camel-jbang/camel-jbang-core`. The related integration tests in `dsl/camel-jbang/camel-jbang-it` are excluded from CI. Consider running them manually:
   > ```
   > mvn verify -f dsl/camel-jbang/camel-jbang-it -Djbang-it-test
   > ```
   
   <details><summary>All tested modules (6 modules)</summary>
   
   - Camel :: JBang :: Core
   - Camel :: JBang :: MCP
   - Camel :: JBang :: Plugin :: Route Parser
   - Camel :: JBang :: Plugin :: TUI
   - Camel :: JBang :: Plugin :: Validate
   - Camel :: Launcher :: Container
   
   </details>
   
   ---
   :gear: [View full build and test results](https://github.com/apache/camel/actions/runs/26883990652)


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


Re: [PR] CAMEL-23679: camel-tui - Add structured data access MCP tools [camel]

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus merged PR #23734:
URL: https://github.com/apache/camel/pull/23734


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