Skip to content

CAMEL-23474: camel-jbang-mcp - stop echoing input route in camel_route_context response#23384

Merged
oscerd merged 1 commit into
apache:mainfrom
oscerd:fix/CAMEL-23474
May 21, 2026
Merged

CAMEL-23474: camel-jbang-mcp - stop echoing input route in camel_route_context response#23384
oscerd merged 1 commit into
apache:mainfrom
oscerd:fix/CAMEL-23474

Conversation

@oscerd
Copy link
Copy Markdown
Contributor

@oscerd oscerd commented May 20, 2026

Summary

Drop the route field from RouteContextResult (CAMEL-23474). The caller just sent the
route as input — sending it back wastes LLM context-window tokens, especially for multi-line YAML
routes. Part of the ongoing camel-jbang-mcp token-reduction effort (sibling tickets:
CAMEL-23475, CAMEL-23476, CAMEL-23472).

Changes

  • ExplainTools.RouteContextResult no longer carries a route field; it is now
    (format, components, eips, summary).
  • ExplainTools.camel_route_context constructor call updated accordingly.
  • New ExplainToolsTest covering:
    • The result record component layout (reflective check).
    • The serialized JSON no longer contains a distinctive marker from the input route.
    • Blank-route validation still throws.
    • Known component (timer) is still extracted.
  • Upgrade-guide entry added under camel-jbang-mcp in camel-4x-upgrade-guide-4_21.adoc.

Test plan

  • mvn -DskipTests install in dsl/camel-jbang/camel-jbang-mcp (formats + builds)
  • mvn test in dsl/camel-jbang/camel-jbang-mcp — 253 tests pass, including 3 new ones
  • mvn clean install -DskipTests from repo root — full reactor build green, no uncommitted
    regenerated artifacts

Claude Code on behalf of Andrea Cosentino

…e_context response

Remove the `route` field from `RouteContextResult`. The caller just
sent the route as input; echoing it back wastes LLM context-window
tokens, especially for multi-line YAML routes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
@oscerd oscerd requested review from davsclaus and gnodet May 20, 2026 16:37
@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
Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

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

@oscerd oscerd merged commit ad904b8 into apache:main May 21, 2026
7 checks passed
@oscerd oscerd deleted the fix/CAMEL-23474 branch May 21, 2026 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants