Skip to content

CAMEL-23529: camel-jbang-mcp - add ascii/unicode theme support to route diagram tool#23306

Merged
davsclaus merged 1 commit into
mainfrom
feature/camel-23529-mcp-ascii-diagram
May 18, 2026
Merged

CAMEL-23529: camel-jbang-mcp - add ascii/unicode theme support to route diagram tool#23306
davsclaus merged 1 commit into
mainfrom
feature/camel-23529-mcp-ascii-diagram

Conversation

@davsclaus
Copy link
Copy Markdown
Contributor

Summary

  • Extends the camel_render_route_diagram MCP tool to support ascii and unicode themes in addition to the existing PNG image themes (dark, light, transparent)
  • For text themes the ASCII diagram is returned directly in the asciiDiagram field of RouteDiagramResult, enabling LLM callers to read and reason about the route structure without opening a file
  • Temporary output file uses a .txt suffix in text mode so CamelRouteDiagramAction writes to the correct path (previously only .png was used, which caused the action to silently write to a different path)
  • Updated @ToolArg descriptions to document the new theme values and the dual-mode behaviour
  • Added two new test cases (ascii and unicode theme validation paths)

Changes

  • RouteDiagramTools.java — detect text themes, use .txt temp file, read content and populate asciiDiagram
  • RouteDiagramResult record — new asciiDiagram field (null for image themes)
  • RouteDiagramToolsTest.java — two new validation tests for ascii/unicode themes

Test plan

  • All 233 unit tests in camel-jbang-mcp pass (mvn test in module)
  • Full mvn clean install -DskipTests from repo root passes

Fixes: https://issues.apache.org/jira/browse/CAMEL-23529

Claude Code on behalf of Claus Ibsen

…te diagram tool

The MCP camel_render_route_diagram tool now supports 'ascii' and 'unicode'
themes in addition to the existing PNG image themes (dark, light, transparent).

For text themes the diagram is returned directly as the asciiDiagram field of
the result so that LLM callers can read and reason about the route structure
without needing to open a file. The temporary output file uses a .txt suffix
in text mode so CamelRouteDiagramAction writes to the correct path.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Claus Ibsen <claus.ibsen@gmail.com>
@github-actions
Copy link
Copy Markdown
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 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 have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@github-actions github-actions Bot added the dsl label May 18, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • dsl/camel-jbang/camel-jbang-mcp

⚠️ Some tests are disabled on GitHub Actions (@DisabledIfSystemProperty(named = "ci.env.name")) and require manual verification:

  • dsl/camel-jbang/camel-jbang-mcp: 1 test(s) disabled on GitHub Actions

⚙️ View full build and test results

@davsclaus davsclaus merged commit 4534326 into main May 18, 2026
6 checks passed
@davsclaus davsclaus deleted the feature/camel-23529-mcp-ascii-diagram branch May 18, 2026 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants