Claus Ibsen created CAMEL-24695:
-----------------------------------

             Summary: camel-jbang: one shared, neutral set of Camel authoring 
MCP tools exposed by both camel-jbang-mcp and camel tui --mcp
                 Key: CAMEL-24695
                 URL: https://issues.apache.org/jira/browse/CAMEL-24695
             Project: Camel
          Issue Type: Improvement
          Components: camel-jbang
            Reporter: Claus Ibsen
            Assignee: Claus Ibsen


h3. Goal
One neutral set of Camel authoring tools for AI agents, defined once in the 
shared {{ToolRegistry}} in camel-jbang-core, exposed by both MCP servers:
* {{camel-jbang-mcp}} ({{camel mcp}}, Quarkus MCP server, STDIO and Streamable 
HTTP) adds its own extras (Kamelet catalog, dependency and CVE audit, 
migration, OpenAPI, security review).
* {{camel-jbang-plugin-tui}} ({{camel tui --mcp}}, JDK HttpServer, Streamable 
HTTP) adds its screen tools (navigate, draw, caption, animate, tape, locate) 
for the person sitting in front of it.

An AI agent should get the same Camel through either door. Today it does not.

h3. Current state (main, 2026-09-11)
* {{ToolRegistry}} / {{ToolDescriptor}} / {{ToolContext}} exist in 
camel-jbang-core ({{commands.ai}}, CAMEL-23873) and are used by {{camel ask}} 
({{AskTools}}), by camel-jbang-mcp ({{RuntimeTools}}, {{AiTraceTools}}) and by 
the TUI ({{TuiMcpServer}}, {{TuiToolRegistry}}, {{AiPanel}}), but mostly for 
runtime introspection.
* The authoring tools are defined twice and have drifted:
** camel-jbang-mcp: {{camel_catalog_*}}, {{camel_validate_yaml_dsl}}, 
{{camel_validate_route}}, {{camel_configuration_validate}}, 
{{camel_error_diagnose}}, ... (73 tools in total, Quarkus {{@Tool}} classes)
** TUI: {{tui_catalog_doc}} (with endpoint URI check and Simple syntax rules), 
{{tui_validate_source}}, {{tui_write_file}} (validates before writing, refuses 
invalid files), {{tui_get_files}}, {{tui_eval_expression}}, {{tui_control}} 
(run/stop/restart), {{tui_get_log}}, {{tui_get_errors}}, ... (51 tools, 
{{TuiToolDefinitions}})
* Capabilities missing from camel-jbang-mcp that an agent needs to build and 
edit an integration: write a file with validation first; start/stop an 
integration in dev mode and read its log (the runtime tools only work against 
an already running process); list and read the source files; check an endpoint 
URI against the catalog with the URI rules spelled out; evaluate a Simple 
expression without a running process.
* Capability missing from the TUI set that camel-jbang-mcp has: 
{{camel_error_diagnose}}.

h3. Proposal
# Define the neutral authoring set in the shared registry with neutral names 
(no {{tui_}} prefix): catalog component/EIP/language/dataformat doc incl. URI 
rules and Simple syntax, list components by protocol or product name 
(CAMEL-24658), validate source (YAML DSL schema, endpoint URIs, Simple, 
properties), write file with validation, list/read files, run/stop/restart in 
dev mode, get log, get errors, eval expression, diagnose error, and (once 
CAMEL-24693 lands) fetch an EIP sample.
# camel-jbang-mcp exposes the shared set through its Quarkus server plus its 
extras; the TUI exposes the shared set through its HttpServer plus its screen 
tools, and its F8 panel and ACP agents use the same definitions. The tool 
descriptions and the {{core}} subset for local models (prompt budget, 
{{AiPanelPromptBudgetTest}}) live with the shared definitions.
# Human confirmation of writes stays where the human is: the TUI keeps its 
confirm/diff/live dialog; camel-jbang-mcp relies on the client (Claude Code, 
Bob, Cursor ask before writes) and documents that.

h3. Acceptance test
The stepwise editing benchmark from 2026-09-11 (8 incremental edit requests on 
the timer-log example, local model {{qwen3.6:35b-a3b}}, harness in the vision 
workspace) currently only runs against {{camel tui --mcp}} because 
camel-jbang-mcp cannot write, run or read the log. After this change it must 
produce the same result against {{camel mcp --http}} with no harness changes 
beyond the server URL.

Related: CAMEL-23873 (shared ToolRegistry), CAMEL-24679 (TUI MCP tool registry 
and launcher), CAMEL-24656 (TUI status/log resources), CAMEL-24663 (ACP), 
CAMEL-24692 / CAMEL-24693 / CAMEL-24694 (validator and samples found by the 
same benchmark).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to