chore(deps): Bump mcp-java-sdk-version from 1.1.3 to 2.0.0#23980
chore(deps): Bump mcp-java-sdk-version from 1.1.3 to 2.0.0#23980dependabot[bot] wants to merge 2 commits into
Conversation
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
There was a problem hiding this comment.
requires manual changes:
[4](https://github.com/apache/camel/actions/runs/27401936643/job/80981809012?pr=23980#step:6:35)
Error: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.15.0:compile (default-compile) on project camel-openai: Compilation failure: Compilation failure:
Error: /home/runner/work/camel/camel/components/camel-ai/camel-openai/src/main/java/org/apache/camel/component/openai/McpToolConverter.java:[52,54] cannot find symbol
Error: symbol: method type()
Error: location: interface java.util.Map<java.lang.String,java.lang.Object>
Error: /home/runner/work/camel/camel/components/camel-ai/camel-openai/src/main/java/org/apache/camel/component/openai/McpToolConverter.java:[52,90] cannot find symbol
Error: symbol: method type()
Error: location: interface java.util.Map<java.lang.String,java.lang.Object>
Error: /home/runner/work/camel/camel/components/camel-ai/camel-openai/src/main/java/org/apache/camel/component/openai/McpToolConverter.java:[54,35] cannot find symbol
Error: symbol: method properties()
Error: location: interface java.util.Map<java.lang.String,java.lang.Object>
Error: /home/runner/work/camel/camel/components/camel-ai/camel-openai/src/main/java/org/apache/camel/component/openai/McpToolConverter.java:[55,100] cannot find symbol
Error: symbol: method properties()
Error: location: interface java.util.Map<java.lang.String,java.lang.Object>
Error: /home/runner/work/camel/camel/components/camel-ai/camel-openai/src/main/java/org/apache/camel/component/openai/McpToolConverter.java:[58,35] cannot find symbol
Error: symbol: method required()
Error: location: interface java.util.Map<java.lang.String,java.lang.Object>
Error: /home/runner/work/camel/camel/components/camel-ai/camel-openai/src/main/java/org/apache/camel/component/openai/McpToolConverter.java:[59,98] cannot find symbol
Error: symbol: method required()
Error: location: interface java.util.Map<java.lang.String,java.lang.Object>
Error: -> [Help 1]
EDIT: the impacting change is https://github.com/modelcontextprotocol/java-sdk/blob/v2.0.0/MIGRATION-2.0.md#toolinputschema-is-mapstring-object-not-jsonschema
The Tool record now models inputSchema (and outputSchema) as arbitrary JSON Schema objects of type Map<String, Object>, so dialect-specific keywords ($ref, unevaluatedProperties, vendor extensions, and so on) round-trip without being trimmed by a narrow JsonSchema record.
Action:
Java code that used Tool.inputSchema() as a JsonSchema must switch to Map<String, Object> (or copy into your own schema wrapper).
Tool.Builder.inputSchema(JsonSchema) remains as a deprecated helper that maps the old record into a map; prefer inputSchema(Map) or inputSchema(McpJsonMapper, String).
|
that is a big jump - and i guess requires code changes. |
Bumps `mcp-java-sdk-version` from 1.1.3 to 2.0.0. Updates `io.modelcontextprotocol.sdk:mcp-core` from 1.1.3 to 2.0.0 - [Release notes](https://github.com/modelcontextprotocol/java-sdk/releases) - [Commits](modelcontextprotocol/java-sdk@v1.1.3...v2.0.0) Updates `io.modelcontextprotocol.sdk:mcp-json-jackson2` from 1.1.3 to 2.0.0 - [Release notes](https://github.com/modelcontextprotocol/java-sdk/releases) - [Commits](modelcontextprotocol/java-sdk@v1.1.3...v2.0.0) --- updated-dependencies: - dependency-name: io.modelcontextprotocol.sdk:mcp-core dependency-version: 2.0.0 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: io.modelcontextprotocol.sdk:mcp-json-jackson2 dependency-version: 2.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
2 points to improve in another iteration: * several methods are now deprecated * would be worthy to add assertions in test for the `required` parameter. Currently, the code is executed by the test but there is no specific assertion for it. Signed-off-by: Aurélien Pupier <apupier@ibm.com>
0066c4f to
56c5e23
Compare
|
note that I successfully launched the Integration tests locally with |
|
🧪 CI tested the following changed modules:
✅ POM dependency changes: targeted tests included Changed properties: mcp-java-sdk-version Modules affected by dependency changes (1)
All tested modules (8 modules)
|
davsclaus
left a comment
There was a problem hiding this comment.
Thanks for the version bump and the compilation fix, @apupier — nice catch on the inputSchema migration.
A few observations from a project-rules perspective:
Confirmed Issues
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.
Questions
4. Broader behavioral changes in MCP SDK 2.0.0
Beyond the JsonSchema removal, MCP SDK 2.0.0 introduces null-enforcement on CallToolRequest construction and other behavioral changes (migration guide). Current test coverage exercises the happy path — has the team evaluated edge-case behavioral changes?
This review checks project rules and conventions only. It does not replace specialized review tools (CodeRabbit, Sourcery) or static analysis (SonarCloud).
This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.
| @@ -49,14 +49,16 @@ private static ChatCompletionFunctionTool convertTool(McpSchema.Tool tool) { | |||
| if (tool.inputSchema() != null) { | |||
| FunctionParameters.Builder paramsBuilder = FunctionParameters.builder(); | |||
| paramsBuilder.putAdditionalProperty("type", | |||
There was a problem hiding this comment.
The production code correctly migrated to Map<String, Object> API here. However, the corresponding tests (McpToolConverterTest and OpenAIProducerMcpMockTest) still construct McpSchema.JsonSchema objects and pass them through the deprecated inputSchema(JsonSchema) builder method. Consider updating the tests to use Map<String, Object> directly to match this production pattern and avoid reliance on deprecated APIs.
Bumps
mcp-java-sdk-versionfrom 1.1.3 to 2.0.0.Updates
io.modelcontextprotocol.sdk:mcp-corefrom 1.1.3 to 2.0.0Release notes
Sourced from io.modelcontextprotocol.sdk:mcp-core's releases.
... (truncated)
Commits
f56d038Release version 2.0.0d20af91Add 2025-11-25 spec version to all transports (#1025)c42d313Return void from McpStatelessSyncServer#closeGracefully instead of Mono (#1019)2756337Update documentation and migration notes for v2 (#1024)fe82ad5Add schemas for form-based elicitation (#1020)99faac6Clarify tool validation error messages (#1023)df75857fix: avoid dropped errors when transport is closed or uninitialized (#995)dbb9bdaAdd URL elicitation support (SEP-1036) (#993)c49a994Add missing Export-Package to mcp-json-jackson2 and mcp-json-jackson3c8ab341feat: Refine logging levels (#985)Updates
io.modelcontextprotocol.sdk:mcp-json-jackson2from 1.1.3 to 2.0.0Release notes
Sourced from io.modelcontextprotocol.sdk:mcp-json-jackson2's releases.
... (truncated)
Commits
f56d038Release version 2.0.0d20af91Add 2025-11-25 spec version to all transports (#1025)c42d313Return void from McpStatelessSyncServer#closeGracefully instead of Mono (#1019)2756337Update documentation and migration notes for v2 (#1024)fe82ad5Add schemas for form-based elicitation (#1020)99faac6Clarify tool validation error messages (#1023)df75857fix: avoid dropped errors when transport is closed or uninitialized (#995)dbb9bdaAdd URL elicitation support (SEP-1036) (#993)c49a994Add missing Export-Package to mcp-json-jackson2 and mcp-json-jackson3c8ab341feat: Refine logging levels (#985)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)