- Notifications
You must be signed in to change notification settings - Fork3.2k
perf: integrate go-sdk schema caching optimization (Phase 1)#1533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
Add replace directive to use github.com/SamMorrowDrums/go-sdk forkwith schema caching optimization for improved tool registration performance.Expected improvements:- 132x faster tool registration- 51x fewer allocations- 19% faster per-tool-call validationCo-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
SamMorrowDrums commentedDec 4, 2025
@copilot Run licenses check |
Run script/licenses to update license files after adding thereplace directive for github.com/SamMorrowDrums/go-sdk fork.Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
CopilotAI commentedDec 4, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Ran Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
SamMorrowDrums commentedDec 5, 2025
Update RequiredThe upstream go-sdk PR has been cleaned up based on reviewer feedback. The input validation optimization (ApplyDefaults on structs) was removed because it's fundamentally broken per the jsonschema-go maintainer. What changed in go-sdk PR#685:
New commit to reference:replacegithub.com/modelcontextprotocol/go-sdk=>github.com/SamMorrowDrums/go-sdkv0.0.0-20251205102140-988974db6bfb The old commit Performance impact: Still get the 132x faster tool registration from schema caching, just without the per-call validation optimization (which was wrong anyway). |
The upstream go-sdk PR was cleaned up based on reviewer feedback:- Removed broken input validation optimization (ApplyDefaults on structs)- Fixed sync.Map.Clear() usage- Fixed benchmark namingNew commit 988974db6bfb contains only the schema caching optimization.
kritsada1998mt-create commentedDec 5, 2025
ghcr.io/github/github-mcp-server |
Uh oh!
There was an error while loading.Please reload this page.
Closes:#767
Integrates schema caching optimization from go-sdk fork to eliminate expensive reflection-based schema generation on every
AddToolcall. Critical for stateless server patterns where a new server is created per HTTP request.Benchmark improvements:
Changes
replacedirective ingo.modpointing togithub.com/SamMorrowDrums/go-sdkfork with schema cachinggo.sumwith fork dependenciesscript/licensesNo code changes required—optimization is transparent to integrators.
Tradeoffs
Using a fork temporarily until the optimization is merged upstream. The fork tracks the
perf/phase1-schema-cachebranch fromSamMorrowDrums/go-sdk#1.Alternatives
Could wait for upstream merge, but the performance impact on stateless server patterns is significant enough to warrant immediate integration.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn moreCopilot coding agent tips in the docs.