Skip to content

Add $defs to ToolSchema and tests#526

Merged
kpavlov merged 2 commits intomodelcontextprotocol:mainfrom
i1bro:fix/tool-schema-defs
Feb 16, 2026
Merged

Add $defs to ToolSchema and tests#526
kpavlov merged 2 commits intomodelcontextprotocol:mainfrom
i1bro:fix/tool-schema-defs

Conversation

@i1bro
Copy link
Contributor

@i1bro i1bro commented Feb 16, 2026

Add $defs support in ToolSchema and update tests.

Motivation and Context
Fix parsing when tool schemas include $defs.

How Has This Been Tested?

./gradlew :kotlin-sdk-core:jvmTest --tests "io.modelcontextprotocol.kotlin.sdk.types.ToolsTest"

Breaking Changes
No.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context
N/A

@kpavlov kpavlov added bugfix Something was fixed 🎉 internal-users Issues and PRs raised by internal users labels Feb 16, 2026
Copy link
Contributor

@kpavlov kpavlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @i1bro
LGTM

@kpavlov kpavlov merged commit 1b255a2 into modelcontextprotocol:main Feb 16, 2026
12 checks passed
kpavlov pushed a commit that referenced this pull request Feb 16, 2026
Add $defs support in ToolSchema and update tests.

Motivation and Context
Fix parsing when tool schemas include $defs.

How Has This Been Tested?

`./gradlew :kotlin-sdk-core:jvmTest --tests
"io.modelcontextprotocol.kotlin.sdk.types.ToolsTest"`

Breaking Changes
No.

Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update

Checklist
- [x] I have read the MCP Documentation
- [x] My code follows the repository's style guidelines
- [x] New and existing tests pass locally
- [ ] I have added appropriate error handling
- [ ] I have added or updated documentation as needed

Additional context
N/A

(cherry picked from commit 1b255a2)
@kpavlov kpavlov added this to the 0.9 milestone Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Something was fixed 🎉 internal-users Issues and PRs raised by internal users

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants