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

   # Description
   
   _AI-generated on behalf of atiaomar1978-hub using Cursor._
   
   Implements [CAMEL-23397](https://issues.apache.org/jira/browse/CAMEL-23397): 
parity between MCP tools and route-based `ai-tool` tools in the `camel-openai` 
agentic loop.
   
   ### Changes
   
   - **`camel-ai-tool`**: add `returnDirect` to `AiToolAnnotations` / 
`AiToolConfiguration` and document it.
   - **`camel-mcp-server`**: publish `returnDirect` in MCP tool annotations via 
`VertxMcpServerEngine`.
   - **`camel-openai`**:
     - new `tags` endpoint option to discover route tools from the shared 
`AiToolRegistry`
     - convert route tools to OpenAI function tools (`AiToolSpecToOpenAI`, 
`OpenAIRouteToolSupport`)
     - execute route tools in `McpToolCallExecutor` via `AiToolExecutor`
     - honour `returnDirect` annotations when short-circuiting the agentic loop
     - refresh route tools dynamically when the registry changes
     - support manual `tool-execution` loops with tags-only route tools
   
   ### Testing
   
   ```bash
   ./mvnw -pl 
components/camel-ai/camel-ai-tool,components/camel-ai/camel-openai -am test \
     
-Dtest=AiToolAnnotationsTest,OpenAIRouteToolSupportTest,OpenAIRouteToolReturnDirectTest,McpToolCallExecutorTest,OpenAIProducerMcpMockTest,OpenAIEndpointMcpToolRefreshTest
   ```
   
   # Target
   
   - [x] I checked that the commit is targeting the correct branch (Camel 4 
uses the `main` branch)
   
   # Tracking
   - [x] If this is a large change, bug fix, or code improvement, I checked 
there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for 
the change (usually before you start working on it).
   
   # Apache Camel coding standards and style
   
   - [x] I checked that each commit in the pull request has a meaningful 
subject line and body.
   - [x] I have run `mvn clean install -DskipTests` locally from root folder 
and I have committed all auto-generated changes.
   
   # AI-assisted contributions
   
   - [x] If this PR includes AI-generated code, commits have proper 
co-authorship attribution (e.g., `Co-authored-by` trailers) and the PR 
description identifies the AI tool used.


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