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

Claus Ibsen reassigned CAMEL-25379:
-----------------------------------

    Assignee: Claus Ibsen

> camel-jbang - AI tools: Kamelets in camel_catalog_doc and camel_catalog_find, 
> and kamelet: endpoints checked by the validator
> -----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-25379
>                 URL: https://issues.apache.org/jira/browse/CAMEL-25379
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-jbang
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 4.23.0
>
>
> A local model benchmark side check (qwen3.6:35b-a3b, the camel-jbang-mcp 
> server) wrote the same tasks with Kamelets and with plain components. With 
> the MCP tools, the components passed 14 of 15 steps and the catalog Kamelets 
> 1 of 15: worse than with no tools at all (3 of 15).
> Why:
> * camel_catalog_doc and camel_catalog_find do not know Kamelets: 
> camel_catalog_doc name=timer-source answers 'Artifact not found', 
> camel_catalog_find 'timer source' finds nothing. The model called 
> camel_catalog_find 13 to 20 times per step looking for the Kamelet and ran 
> out of calls without writing. (camel_catalog_kamelet_doc exists in the MCP 
> server, but is not in the core tool set an agent gets.)
> * The validator does not check kamelet: endpoints (EndpointChecks skips the 
> options of a kamelet: endpoint). It accepted kamelet:kafka-not-secured-source 
> (folded into kafka-source), brokers/brokerList on kafka-sink 
> (bootstrapServers), topics, a misspelled showHeader on log-sink, and 
> timer-source without its required message. The route then failed at runtime 
> ('mandatory parameters must be provided: message') or, for a misspelled 
> optional property, did nothing.
> * The Kamelet catalog helper printed defaults and examples as 
> AnyType(value=1000), also in camel doc timer-source.
> Proposal:
> * camel_catalog_doc answers a Kamelet: type, properties with required, type, 
> default and enum, and the YAML form; camel_catalog_find lists matching 
> Kamelets; an unknown name suggests close Kamelets (kafka-not-secured-source: 
> kafka-source).
> * The validator checks kamelet: endpoints against the Kamelet catalog and the 
> project's own *.kamelet.yaml files: unknown Kamelet (with suggestions), 
> unknown property (with the Kamelet's property list), missing required 
> property without a default (camel.kamelet.<name>.<prop> in application 
> properties counts). On a write an unknown name is only an error when close to 
> a known one, so a route can be written before its custom Kamelet.
> * For a Kamelet file: a property used as a Simple function 
> (${properties.tag}) gets the hint that it is the placeholder {{tag}} in the 
> template.
> * KameletCatalogHelper unwraps AnyType.
> After the change (same side check, 3 runs per arm): catalog Kamelets 3/15 -> 
> 12/15 without catalog tools (the validator on write), 1/15 -> 14/15 with 
> them; the components are unchanged.



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

Reply via email to