davsclaus opened a new pull request, #27447: URL: https://github.com/apache/camel/pull/27447
https://issues.apache.org/jira/browse/CAMEL-25379 A local model benchmark side check (qwen3.6:35b-a3b with the camel-jbang-mcp server) wrote the same tasks with Kamelets and with plain components. With the MCP tools the Kamelet steps passed 1 of 15, against 14 of 15 for the components. The catalog tools didn't know Kamelets, so the model called `camel_catalog_find` 13 to 20 times per step looking for one and ran out of calls. The validator accepted any Kamelet name or property, so wrong guesses only failed at runtime ("mandatory parameters must be provided"). A misspelled optional property never failed at all. What changes: - `camel_catalog_doc name=<kamelet>` answers a Kamelet: - its type and the YAML form; - its properties, with required, type, default and enum. - An unknown name suggests close Kamelets: `kafka-not-secured-source` suggests `kafka-source`. - `camel_catalog_find` lists matching Kamelets. - The validator (`KameletChecks`) checks `kamelet:` endpoints against the Kamelet catalog and the project's own `*.kamelet.yaml` files: - an unknown Kamelet; - an unknown property, listing the Kamelet's properties; - a missing required property that has no default. Setting it as `camel.kamelet.<name>.<prop>` in application properties counts as given. - On a write, an unknown name is only an error when it's close to a known Kamelet. A route can then be written before its custom Kamelet, as for direct: consumers in CAMEL-24955. - In a Kamelet file, a property written as a Simple function (`${properties.tag}`) gets the hint that it's the placeholder `{{tag}}` in the template. - `KameletCatalogHelper` unwraps the model's `AnyType`. `camel doc timer-source` showed the default as `AnyType(value=1000)`. Side check, before and after this change (steps passed, 3 runs per arm): | | no catalog tools | MCP tools | |---|---|---| | catalog Kamelets, before | 3/15 | 1/15 | | catalog Kamelets, after | 12/15 | 14/15 | | components (unchanged) | 13/15, 11/15 | 14/15, 11/15 | The "no catalog tools" arm still validates on write, which is why it improves. The component runs never touch the new checks; their spread is run-to-run noise. Tests: `KameletChecksTest` (16). camel-jbang-core passes 1545 of 1545. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
