-
Notifications
You must be signed in to change notification settings - Fork 138
feat: adds support for dropping vector search indexes in drop-index tool MCP-239 #642
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: adds support for dropping vector search indexes in drop-index tool MCP-239 #642
Conversation
There was a problem hiding this comment.
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 introduces a new drop-search-index
tool for dropping search indexes from MongoDB collections. The tool is currently restricted to test environments and includes elicitation (confirmation) functionality for safety.
- Introduces a new
drop-search-index
tool with proper validation, error handling, and elicitation support - Refactors existing search index functionality to support code reuse between list and drop operations
- Adds comprehensive test coverage including unit, integration, and elicitation tests
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
src/tools/mongodb/delete/dropSearchIndex.ts | New tool implementation for dropping search indexes with validation and confirmation |
src/tools/mongodb/search/listSearchIndexes.ts | Refactored to extract reusable search index retrieval logic |
src/tools/mongodb/tools.ts | Added the new tool to the exports list |
src/common/config.ts | Added drop-search-index to confirmation required tools list |
tests/integration/tools/mongodb/delete/dropSearchIndex.test.ts | Comprehensive test suite for the new tool |
tests/integration/tools/mongodb/search/listSearchIndexes.test.ts | Updated to use refactored helper functions |
tests/integration/helpers.ts | Added reusable helper functions for search index operations |
tests/integration/tools/mongodb/mongodbClusterProcess.ts | Added directConnection parameter to connection string |
4e0e3e0
to
3df48c4
Compare
Pull Request Test Coverage Report for Build 18562320578Details
💛 - Coveralls |
10f49db
to
d6f1b91
Compare
- Tool is currently only visible to tests - Tool has been added to the list of tools requiring elicitation - Tests have been added for basic tool functionality and elicitation - listSearchIndexes tool and its tests have been modified to re-use some of the existing code.
1. Wraps the toolcall result in untrusted data wrapper 2. Add additional test for confirming that we don't drop when confirmation is not provided
effaac6
to
7d795ca
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, the only thing I would suggest is in the elicitation message to add the type of index that is going to be deleted, to be as clear as possible with the user.
Proposed changes
Adds support for dropping vector search indexes in drop-index tool. The functionality is behind a feature flag.
Checklist