ramu11 opened a new pull request, #29722: URL: https://github.com/apache/camel/pull/29722
## Description This change adds support for serving MCP resource templates from Camel `ai-resource` routes, allowing a single route to serve multiple concrete resource URIs. ### Implementation - Add `uriTemplate` as an alternative to `resourceUri` on `ai-resource`. Exactly one must be configured; configuring both or neither fails route startup. - Support the RFC 6570 level 1 subset where each template variable occupies a complete path segment. - Match incoming resource URIs against registered templates and pass the concrete URI and captured variables to the route through the `CamelAiResourceUri` and `CamelAiResourceTemplateVariable.*` headers. Variable values remain raw, untrusted client input and are not property-resolved or evaluated. - Give fixed resources precedence over matching templates. Reject overlapping exposed templates with an error, and return a resource-not-found error for unmatched URIs without invoking a route. - Add opt-in resource-template support to the `McpServerEngine` SPI. Enable it in the Vert.x HTTP and stdio MCP server engines. - Publish and remove tagged resource templates as routes start and stop, and notify connected clients using `notifications/resources/list_changed`. ### Tests - Add URI-template parsing, matching, variable extraction, and overlap tests. - Add resource registry, route lifecycle, and MCP bridge tests. - Extend MCP resource conformance tests to cover template listing and reads, fixed-resource precedence, unmatched URIs, and lifecycle changes. - Add stdio end-to-end coverage for template listing, reading, and route lifecycle notifications. -- 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]
