atiaomar1978-hub opened a new pull request, #25394:
URL: https://github.com/apache/camel/pull/25394

   _AI-generated PR on behalf of atiaomar1978-hub via Cursor Cloud Agent._
   
   ## Summary
   
   Implements [CAMEL-24332](https://issues.apache.org/jira/browse/CAMEL-24332): 
optional MCP `ToolAnnotations` metadata on `ai-tool` consumer endpoints.
   
   Routes can now declare advisory hints for MCP clients:
   
   ```
   ai-tool:delete_order?tags=orders&title=Delete 
order&destructiveHint=true&idempotentHint=false
   ```
   
   Supported options: `title`, `readOnlyHint`, `destructiveHint`, 
`idempotentHint`, `openWorldHint`.
   
   ## Changes
   
   - **`AiToolAnnotations`** value object + new `@UriParam` options on 
`AiToolConfiguration`
   - **`AiToolSpec`** carries annotations from consumer registration
   - **`McpServerTool` SPI** extended with `annotations()` (default `null`)
   - **`McpServerBridge`** passes spec annotations into published tools
   - **`VertxMcpServerEngine`** maps hints to MCP Java SDK `Tool.title()` / 
`ToolAnnotations`
   - Documentation in `ai-tool-component.adoc`; regenerated catalog + DSL 
metadata
   
   Hints are **advisory only** (per MCP spec) — documented as not enforced by 
Camel.
   
   ## Tests
   
   - `AiToolAnnotationsTest` — configuration parsing
   - `AiToolEndpointLifecycleTest` — registry spec carries hints
   - `McpServerBridgeTest` — bridge passthrough to `McpServerTool`
   - `VertxMcpServerToolAnnotationsTest` — Vert.x engine exposes hints via 
`listTools`
   
   All tests pass locally.
   
   ## Notes
   
   - Extends `McpServerTool` SPI before 4.22 release as requested in the JIRA
   - Quarkus/Spring MCP engines can adopt the same SPI method when available 
in-repo


-- 
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]

Reply via email to