Remove filter tool and add table capacity discovery - #20
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the MSSQL MCP Server tool catalog to discourage repetitive “narrow probe” reads by removing the public filter_data tool and adding a new read-only capacity discovery tool (list_largest_tables) that surfaces table storage and row-count hotspots.
Changes:
- Added
list_largest_tablestool (plus schema helper and unit tests) to rank largest user tables by reserved/used storage and row counts. - Removed the public
filter_dataMCP tool (and its tests/E2E coverage), while keeping structured filtering for internal write previews. - Updated registry/instructions/docs/versioning/changelog to reflect the new tool set.
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/tools/ListLargestTablesTool.ts | New MCP tool implementation and text formatting for largest-table results |
| src/tools/FilterDataTool.ts | Removed the public structured filtering read tool |
| src/toolRegistry.ts | Unregistered filter_data, registered list_largest_tables, removed now-unused schemas |
| src/schema.ts | Added LargestTableRow type + listLargestTables query helper |
| src/index.ts | Updated server version + user instructions to reference list_largest_tables and prefer read_data |
| src/tests/toolRegistry.test.ts | Updated registry tests for removal/addition of tools |
| src/tests/ListLargestTablesTool.test.ts | Added unit tests for the new tool formatting and behavior |
| src/tests/filteredRead.test.ts | Updated param-prefix expectation after removing filter_data |
| src/tests/FilterDataTool.test.ts | Removed tests for the deleted tool |
| scripts/e2e-mcp-tools.mjs | Swapped E2E coverage from filter_data to list_largest_tables |
| README.md | Updated tool list and examples to remove filter_data and add list_largest_tables |
| package.json | Bumped version to 1.5.0 |
| package-lock.json | Updated lockfile version metadata to 1.5.0 |
| CHANGELOG.md | Documented addition/removal for 1.5.0 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
What changed
list_largest_tablesfor read-only capacity discovery, including reserved and used storage plus row counts.filter_datatool after it encouraged repeated agent tool calls; structured filtering remains internal to write previews.Why
Removing the overlapping read tool lets agents use
read_datafor complete queries instead of repeatedly probing tables with narrow filters.Validation
npm run buildnpm run lintnpm test