Aias00 opened a new pull request, #6312: URL: https://github.com/apache/shenyu/pull/6312
## Summary - Add reflection field caching in `McpSessionHelper` for better performance and reliability - Add `SUPPORTED_SDK_VERSION` constant for SDK compatibility tracking - Enhance error messages with SDK version information in `ShenyuToolCallback` - Add SDK compatibility notes in `pom.xml` documenting reflection usage - Update `MCP_TOOL_EXAMPLES.md` and `MCP_TOOL_EXAMPLES_EN.md` with SDK version compatibility table ## Changes ### McpSessionHelper.java - Static field caching for reflection (`exchangeField`, `sessionField`) - Field resolution at class load time with logging - `checkReflectionAvailability()` with re-resolve fallback - `isReflectionAvailable()` for proactive checking - Clear error messages with SDK version info - `SUPPORTED_SDK_VERSION` constant for compatibility tracking ### ShenyuToolCallback.java - Enhanced error messages including SDK version information - Better error context for debugging reflection failures ### pom.xml - Added SDK compatibility documentation comments - Documented reflection usage on internal SDK fields - Cleaned up commented-out dependencies ### Documentation (MCP_TOOL_EXAMPLES.md, MCP_TOOL_EXAMPLES_EN.md) - Added SDK Version Compatibility section - Documented supported protocols (SSE, Streamable HTTP) - Documented known limitations (reflection, timeout, CORS) ## Test Results ``` Tests run: 76, Failures: 0, Errors: 0, Skipped: 0 BUILD SUCCESS ``` ## SDK Compatibility | Dependency | Version | |------------|---------| | MCP SDK | 0.17.0 | | Spring AI | 1.1.2 | | Spring Boot | 3.3.1 | 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
