Aurélien Pupier created CAMEL-23749:
---------------------------------------
Summary: Embrace MCP Java SDK new 2.0.0 API
Key: CAMEL-23749
URL: https://issues.apache.org/jira/browse/CAMEL-23749
Project: Camel
Issue Type: Improvement
Components: camel-openai
Affects Versions: 4.20.0
Reporter: Aurélien Pupier
1. Tests still use deprecated McpSchema.JsonSchema API (Medium)
McpToolConverterTest.java (lines 37, 72, 91) and OpenAIProducerMcpMockTest.java
(line 130) still construct McpSchema.JsonSchema objects via the deprecated
Tool.builder().inputSchema(JsonSchema) shim. The production code was correctly
updated to use Map<String, Object>, but the tests lag behind. Per the project's
quality expectations ("Avoid usage of deprecated code"), these should be
updated — acknowledged by @apupier in the commit message as a follow-up item.
2. Missing test assertion for required field (Low)
The convertFullSchema() test exercises the required parameter code path but
only asserts parameters().isPresent() — it doesn't verify the required array
appears in the converted output. Also noted by @apupier in the commit message.
3. HttpClientSseClientTransport deprecated upstream (Informational)
MCP SDK 2.0.0 deprecates SSE transports in favor of Streamable HTTP. The sse
transport type path in OpenAIEndpoint.createMcpTransport() uses the deprecated
class. The code already supports streamableHttp, so this is not blocking — just
a note for a future cleanup pass.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)