Skip to content

Remove filter tool and add table capacity discovery - #20

Merged
eamonboyle merged 2 commits into
mainfrom
codex/remove-filter-data
Jul 9, 2026
Merged

Remove filter tool and add table capacity discovery#20
eamonboyle merged 2 commits into
mainfrom
codex/remove-filter-data

Conversation

@eamonboyle

Copy link
Copy Markdown
Owner

What changed

  • Adds list_largest_tables for read-only capacity discovery, including reserved and used storage plus row counts.
  • Removes the public filter_data tool after it encouraged repeated agent tool calls; structured filtering remains internal to write previews.

Why

Removing the overlapping read tool lets agents use read_data for complete queries instead of repeatedly probing tables with narrow filters.

Validation

  • npm run build
  • npm run lint
  • npm test

@eamonboyle
eamonboyle marked this pull request as ready for review July 9, 2026 21:05
@eamonboyle
eamonboyle requested a review from Copilot July 9, 2026 21:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_tables tool (plus schema helper and unit tests) to rank largest user tables by reserved/used storage and row counts.
  • Removed the public filter_data MCP 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.

Comment thread src/tools/ListLargestTablesTool.ts Outdated
Comment thread src/schema.ts Outdated
@eamonboyle
eamonboyle merged commit addffaa into main Jul 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants