oscerd opened a new pull request, #22830:
URL: https://github.com/apache/camel/pull/22830
## Summary
Exposes `CamelCatalog.validateConfigurationProperty()` as an MCP tool so an
agent can validate one or more `application.properties` lines and receive
per-property errors, suggestions for misspelled options and human-readable
summaries (CAMEL-23179).
The tool accepts a single property line or a multi-line string, skips blank
lines and `#` / `!` comments, and reports each line with:
- `accepted` — whether the key is a Camel-prefixed key the catalog recognises
- `valid` — whether the line passed validation
- `errors` / `warnings` counts
- a structured list of `issues` tagged by kind (`unknown`, `required`,
`deprecated`, `invalidEnum`, `invalidBoolean`, `invalidInteger`,
`invalidNumber`, `invalidDuration`, `invalidReference`, `invalidMap`,
`invalidArray`, `unknownComponent`, `incapable`, `syntax`), each carrying
the option name, message and suggestions when available
- a human-readable `summary` from `summaryErrorMessage`
## Changes
- `ConfigurationValidateTools` — new `@ApplicationScoped` tool class exposing
`camel_configuration_validate`. Resolves a `CamelCatalog` via the existing
`CatalogService` so the runtime / camelVersion / platformBom selectors
match the rest of the MCP catalog tools.
- `PropertiesValidationResult` — new public `getInvalidEnumSuggestions()`
getter (backwards-compatible additive change). The field already existed
with a public adder; a getter was missing, which the new tool needs to
surface enum suggestions without reflection.
- `ConfigurationValidateToolsTest` — 8 unit tests covering valid input,
unknown options, invalid boolean, multi-line aggregation,
comment/blank-line skipping, non-camel keys (`accepted=false`) and missing
input validation.
## Test plan
- [x] `mvn test` in `dsl/camel-jbang/camel-jbang-mcp` (197 tests passing,
8 new)
- [x] Full root build `mvn clean install -DskipTests -Dquickly` succeeds
- [x] `camel-api` rebuilt and installed before module build to pick up the
new getter
_Claude Code on behalf of Andrea Cosentino_
--
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]