Skip to content

Conversation

@alxkm
Copy link
Contributor

@alxkm alxkm commented Aug 14, 2025

Add additional test coverage for edge cases in SyncMcpToolCallback.

Changes

  • Empty Response Handling: Test that empty content lists return "[]" JSON array
  • Multiple Content Items: Verify multiple TextContent items are properly serialized as JSON objects with text fields
  • Non-Text Content Support: Ensure ImageContent is correctly serialized with data and mimeType fields

Coverage Improvements

  • API Contract Documentation: Tests document exact JSON serialization format
  • Regression Prevention: Will catch changes to response format in future
  • Edge Case Coverage: Handles scenarios where tools return various content types

Co-authored-by: Oleksandr Klymenko <[email protected]>
Signed-off-by: Oleksandr Klymenko <[email protected]>
@sobychacko sobychacko added this to the 1.1.0.M1 milestone Aug 14, 2025
@sobychacko sobychacko merged commit e5e2f45 into spring-projects:main Aug 14, 2025
2 checks passed
scionaltera pushed a commit to scionaltera/spring-ai that referenced this pull request Sep 3, 2025
chedim pushed a commit to couchbaselabs/spring-ai that referenced this pull request Sep 19, 2025
Willam2004 pushed a commit to Willam2004/spring-ai that referenced this pull request Oct 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants