Repository navigation
test: strengthen MCP tool definition contract validation - #1580
Merged
Shashankss1205 merged 1 commit intoAug 8, 2026
Merged
Shashankss1205 merged 1 commit into
Shashankss1205 merged 1 commit into
Conversation
Add regression tests to verify tool definitions remain consistent with MCPServer wrapper methods and declared tool names.
|
@jyotish6699 is attempting to deploy a commit to the shashankss1205's projects Team on Vercel. A member of the Team first needs to authorize it. |
Shashankss1205
approved these changes
Aug 8, 2026
Shashankss1205
left a comment
Collaborator
There was a problem hiding this comment.
Verified locally: trial-merged with #1583, #1586, #1590 and #1591 — full suite green (1153 passed, 7 skipped).
Good contract test. The bidirectional check is the valuable part: test_every_wrapper_has_a_tool_definition catches a wrapper that exists but was never declared, which is the direction that silently ships dead code. Thanks!
This was referenced Aug 8, 2026
Shashankss1205
added a commit
that referenced
this pull request
Aug 8, 2026
Ten PRs since 0.5.6 — mostly parser correctness, all with regression tests. Parsers - Ruby nested classes no longer delete their parent; method parameters extracted at all (#1523, #1527, #1581) - C/C++ functions returning a pointer or reference are extracted, and registered in pre_scan so they resolve as call targets (#1524, #1582) - C# fields and locals parsed, restoring receiver-type inference for `var x = new T(); x.M();` (#1525, #1584) - JavaScript destructured, array and rest parameters extracted, recording the binding names rather than a placeholder (#1527, #1591) Queries and analysis - Five defects that returned wrong answers without erroring: inflated repository stats, misattributed callers, discarded graph_name, count(*) after OPTIONAL MATCH, an ignored tool argument (#1577) - Dead-code detection made correct and self-consistent, including the JS module-level false positive (#600, #1559, #1578) Indexing - add_package_to_graph on a flat module no longer indexes the whole virtualenv (#1528, #1586) - SCIP job progress no longer exceeds 100% (#1535, #1583) Docs and tests - Database Options table columns realigned (#1590) - MCP tool definition contract validation (#1580) Co-authored-by: Claude Fable 5 <[email protected]>
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
This PR strengthens the MCP contract test suite by adding regression tests that verify the consistency between MCP tool definitions and their corresponding server wrapper methods.
Changes
*_toolwrapper inMCPServer.*_toolwrapper has a corresponding tool definition.namefield matches its registry key.Why
These tests help prevent regressions when introducing new MCP tools by ensuring that tool definitions and server wrapper methods remain synchronized.
Testing
All tests pass successfully.
Closes #1579