feat(go): Add stdlib metadata to MCP call graph tool responses (PR-08)#556
Merged
shivasurya merged 1 commit intomainfrom Feb 25, 2026
Merged
feat(go): Add stdlib metadata to MCP call graph tool responses (PR-08)#556shivasurya merged 1 commit intomainfrom
shivasurya merged 1 commit intomainfrom
Conversation
SafeDep Report SummaryNo dependency changes detected. Nothing to scan. This report is generated by SafeDep Github App |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #556 +/- ##
==========================================
+ Coverage 83.34% 83.37% +0.02%
==========================================
Files 143 143
Lines 17782 17820 +38
==========================================
+ Hits 14820 14857 +37
- Misses 2424 2425 +1
Partials 538 538 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This was referenced Feb 25, 2026
Owner
Author
This was referenced Feb 25, 2026
Owner
Author
Merge activity
|
5b74685 to
e50cbf2
Compare
cb724bb to
0b2c209
Compare
- Add goVersion and goModuleRegistry fields to mcp.Server struct - Add SetGoContext method to wire stdlib loader into MCP server - Call server.SetGoContext in cmd/serve.go after InitGoStdlibLoader - Add stdlibInfoForFQN helper: returns package, signature, return_types - Enhance toolGetCallees: surface is_stdlib and stdlib_info per callee - Enhance toolGetCallDetails: add is_stdlib and stdlib_info to resolution - Enhance toolGetCallers: propagate is_stdlib from matching call site - Add server_stdlib_test.go: 20 tests covering SetGoContext, stdlibInfoForFQN, and all three enhanced tools; stdlibInfoForFQN at 100% coverage - Graceful degradation: all enhancements are no-ops when StdlibLoader is nil Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
e50cbf2 to
88fed98
Compare
Code Pathfinder Security ScanNo security issues detected.
Powered by Code Pathfinder |
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
goVersionandgoModuleRegistryfields tomcp.Server; wire viaSetGoContextcalled fromcmd/serve.goafterInitGoStdlibLoaderstdlibInfoForFQNhelper: resolves a call target FQN to{package, signature, return_types}usingGoStdlibLoaderget_callees: each callee now includesis_stdlib(bool) and, when the loader is available, astdlib_infoblockget_call_details: resolution section now includesis_stdlibandstdlib_infoget_callers: propagatesis_stdlib: truefrom matching call site when applicableStdlibLoaderis nilTest plan
TestSetGoContext_*— fields set correctly; nil registry allowed without panicTestStdlibInfoForFQN_*(8 cases) — nil registry, nil loader, no dot, non-stdlib pkg, function not found, function with signature/returns, empty returns, blank return type skipped; helper at 100% coverageTestToolGetCallees_*—is_stdlibpresent on every callee,stdlib_infoadded when loader available, absent for local callees and when loader is nilTestToolGetCallDetails_*—is_stdliband optionalstdlib_infoin resolution blockTestToolGetCallers_*—is_stdlibpropagated from call site when true; absent when falseTestHandleToolsCall_GetCallees_StdlibRoundTrip— JSON-RPC end-to-end confirmsstdlib_infoin responsegolangci-lint ./mcp/...→ 0 issuesgo test ./mcp/...→ all pass, 92.7% package coverage🤖 Generated with Claude Code