Merged
Conversation
Upgrade go-sdk v1.2.0 → v1.3.0 and jsonschema-go v0.3.0 → v0.4.2. Adopt SchemaCache for tool registration performance and refactor error result helpers to use the SDK's SetError method.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #95 +/- ##
==========================================
- Coverage 89.61% 89.61% -0.01%
==========================================
Files 104 104
Lines 9267 9265 -2
==========================================
- Hits 8305 8303 -2
Misses 713 713
Partials 249 249 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
github.com/modelcontextprotocol/go-sdkfrom v1.2.0 to v1.3.0 (released 2026-02-09)github.com/google/jsonschema-gofrom v0.3.0 to v0.4.2SDK v1.3.0 Changelog Highlights
CallToolResult.SetError(err)andGetError() errorare now public. Canonical way to create/inspect error results.Allowheader on 405 responses per RFC 9110. Fixes compatibility with strict API gateways.PropertyOrdermetadata; emptyPropertiesmarshal as{}instead of being omitted.client.Loggerdirectly — must useClientOptions.Logger. We don't use this pattern; no impact.What Changed in This PR
SchemaCache adoption (
pkg/platform/platform.go)A single shared cache instance eliminates repeated JSON schema reflection when tools are registered. Future-proofs for stateless deployment patterns.
SetError adoption (
pkg/middleware/mcp.go,pkg/middleware/auth.go)Refactored
createErrorResult()andNewToolResultError()to use the SDK'sSetError()method instead of manually constructingIsError: true+Contentslices:This makes error results compatible with
GetError()for programmatic inspection downstream. The audit middleware continues to useextractMCPErrorMessage()(parsingContent[0]text) since that works for all error results regardless of origin — toolkit handlers in mcp-trino/mcp-datahub/mcp-s3 construct errors manually andGetError()would return nil for those.No breaking changes
All
NewClient()calls in our codebase passnilfor options — the removedClient.Loggerfield is not used. No code changes required for compatibility.Test plan
make verifypasses (fmt, test, lint, security, coverage, dead-code, mutation, release-check)Client.Loggerfield in codebaseIsError,Content[0].Textidentical before and after