Skip to content

Conversation

himanshusinghs
Copy link
Collaborator

@himanshusinghs himanshusinghs commented Oct 13, 2025

Proposed changes

Adds support for dropping vector search indexes in drop-index tool. The functionality is behind a feature flag.

  • 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.

Checklist

@himanshusinghs himanshusinghs requested a review from a team as a code owner October 13, 2025 12:57
@Copilot Copilot AI review requested due to automatic review settings October 13, 2025 12:57
Copy link
Contributor

@Copilot Copilot AI left a 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

@himanshusinghs himanshusinghs changed the title feat: introduces drop-search-index tool feat: introduces drop-search-index tool MCP-239 Oct 13, 2025
@himanshusinghs himanshusinghs force-pushed the feat/MCP-239-delete-vector-search-indexes branch from 4e0e3e0 to 3df48c4 Compare October 13, 2025 13:04
@coveralls
Copy link
Collaborator

coveralls commented Oct 13, 2025

Pull Request Test Coverage Report for Build 18562320578

Details

  • 66 of 66 (100.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 82.848%

Totals Coverage Status
Change from base Build 18561031037: 0.1%
Covered Lines: 6022
Relevant Lines: 7138

💛 - Coveralls

@himanshusinghs himanshusinghs force-pushed the feat/MCP-239-delete-vector-search-indexes branch 4 times, most recently from 10f49db to d6f1b91 Compare October 15, 2025 11:55
- 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
@himanshusinghs himanshusinghs force-pushed the feat/MCP-239-delete-vector-search-indexes branch from effaac6 to 7d795ca Compare October 15, 2025 15:39
@himanshusinghs himanshusinghs changed the title feat: introduces drop-search-index tool MCP-239 feat: adds vector search drop support to drop-index tool MCP-239 Oct 15, 2025
@himanshusinghs himanshusinghs changed the title feat: adds vector search drop support to drop-index tool MCP-239 feat: adds support for dropping vector search indexes in drop-index tool MCP-239 Oct 15, 2025
Copy link
Collaborator

@kmruiz kmruiz left a 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.

@himanshusinghs himanshusinghs enabled auto-merge (squash) October 16, 2025 16:09
@himanshusinghs himanshusinghs merged commit adbf3a0 into main Oct 16, 2025
15 of 16 checks passed
@himanshusinghs himanshusinghs deleted the feat/MCP-239-delete-vector-search-indexes branch October 16, 2025 16:14
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.

3 participants