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

   _AI-generated PR on behalf of atiaomar1978-hub via Cursor Cloud Agent._
   
   Supersedes #25394 — same changeset on the correctly named branch 
`feature/CAMEL-24332-ai-tool-mcp-annotations` (Apache convention).
   
   ## 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`** record + 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` and cross-link from 
`mcp-server.adoc`; regenerated catalog docs
   
   Hints are **advisory only** (per MCP spec) — documented as untrusted UX 
metadata, not authorization.
   
   ## Review follow-ups addressed
   
   - Branch renamed to `feature/CAMEL-24332-ai-tool-mcp-annotations`
   - `AiToolAnnotations` converted to a Java record
   - Title-only and partial-hint tests (unit + Vert.x integration)
   - Documented `Tool.title` mapping and catalog `defaultValue: false` vs 
runtime omit semantics
   
   ## Tests
   
   - `AiToolAnnotationsTest`
   - `AiToolEndpointLifecycleTest`
   - `McpServerBridgeTest`
   - `VertxMcpServerToolAnnotationsTest`
   
   All tests pass locally.


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