[ 
https://issues.apache.org/jira/browse/CAMEL-24867?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen resolved CAMEL-24867.
---------------------------------
    Resolution: Fixed

> camel-jbang-mcp - expose the sql, datasource, circuit breaker, metrics, 
> spans, EIP stats, startup and route analysis runtime tools
> ----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-24867
>                 URL: https://issues.apache.org/jira/browse/CAMEL-24867
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-jbang
>            Reporter: Claus Ibsen
>            Priority: Major
>             Fix For: 4.23.0
>
>
> The camel-jbang-mcp server wraps the shared runtime tool registry 
> ({{ToolRegistry}} in camel-jbang-core) in {{RuntimeTools}}, one MCP tool per 
> registry tool, but only 27 of the registry's runtime tools are wrapped. 
> Missing on the MCP side (present in the camel-jbang views and the agent REPL):
> * {{execute_sql}} - run a SQL statement against a DataSource of the running 
> app
> * {{get_datasources}} - connection pool status per datasource
> * {{get_sql_trace}} - traced SQL executions of camel-sql / camel-jdbc
> * {{get_circuit_breakers}} - Resilience4j / MicroProfile breaker state and 
> counts
> * {{get_metrics}} - Micrometer metrics
> * {{get_eip_stats}} - EIP usage and processor performance across routes
> * {{get_spans}} - OpenTelemetry spans
> * {{get_startup_steps}} - startup recorder steps
> * {{get_route_analysis}} - anti-pattern and structure analysis per route
> * {{detect_config_drift}} - running definitions versus source files
> So a model working through the MCP server on an app with a datasource cannot 
> look at the database at all, although the running app can answer ({{camel cmd 
> sql}} does it from the CLI). Found while preparing the CAMEL-24834 tool-group 
> experiment: the connect-service/sql example on H2 was meant to compare the 
> authoring set with and without the sql tools, and the MCP server had none of 
> them.
> Add the wrappers with the same {{camel_runtime_*}} naming and delegation as 
> the existing ones ({{camel_runtime_sql}}, {{camel_runtime_datasources}}, 
> {{camel_runtime_sql_trace}}, {{camel_runtime_circuit_breakers}}, 
> {{camel_runtime_metrics}}, {{camel_runtime_eip_stats}}, 
> {{camel_runtime_spans}}, {{camel_runtime_startup_steps}}, 
> {{camel_runtime_route_analysis}}, {{camel_runtime_config_drift}}) and list 
> them in the camel-jbang-mcp documentation. The remaining unwrapped registry 
> tools are covered by other MCP tools already (catalog, examples, errors, 
> eval, control, heap dump, processes).



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

Reply via email to