Skip to content

Conversation

nirinchev
Copy link
Collaborator

Proposed changes

Checklist

@nirinchev nirinchev requested a review from a team as a code owner October 15, 2025 15:40
@nirinchev nirinchev requested review from Copilot and removed request for a team October 15, 2025 15:40
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

Merge functionality of the former list-search-indexes tool into collection-indexes, consolidating index (regular + search/vector) reporting behind a single tool.

  • Remove list-search-indexes tool and its tests; extend collection-indexes tool to also retrieve search and vector search indexes (behind feature flag and search support check).
  • Update integration and accuracy tests to reflect merged behavior, including scenarios with/without voyage API key and queryable search indexes.
  • Adjust tooling registry to drop the removed tool.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tests/integration/tools/mongodb/search/listSearchIndexes.test.ts Removed obsolete integration tests for deprecated list-search-indexes tool.
tests/integration/tools/mongodb/read/collectionIndexes.test.ts Expanded tests to cover regular, search, and vector search indexes plus feature flag / API key scenarios.
tests/integration/tools/mongodb/create/createIndex.test.ts Minor config simplification for user config object.
tests/accuracy/listSearchIndexes.test.ts Removed accuracy tests for deprecated tool.
tests/accuracy/collectionIndexes.test.ts Added accuracy prompts formerly covered by list-search-indexes.
src/tools/mongodb/tools.ts Removed registration of deprecated ListSearchIndexesTool.
src/tools/mongodb/search/listSearchIndexes.ts Deleted deprecated tool implementation.
src/tools/mongodb/metadata/collectionIndexes.ts Added search/vector index extraction and combined output formatting.

Comment on lines +41 to +50
...formatUntrustedData(
`Found ${indexDefinitions.length} indexes in the collection "${collection}":`,
indexDefinitions.length > 0 ? JSON.stringify(indexDefinitions, null, 2) : undefined
),
...(searchIndexDefinitions.length > 0
? formatUntrustedData(
`Found ${searchIndexDefinitions.length} search and vector search indexes in the collection "${collection}":`,
JSON.stringify(searchIndexDefinitions, null, 2)
)
: []),
Copy link

Copilot AI Oct 15, 2025

Choose a reason for hiding this comment

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

The previous list-search-indexes tool serialized index data with EJSON to preserve extended BSON types; switching to JSON.stringify may lose fidelity (e.g., ObjectId, Date) in future index definitions. Recommend importing EJSON from bson and using EJSON.stringify(..., { relaxed: false }) for both sets to maintain consistency and prevent data loss.

Copilot uses AI. Check for mistakes.

await provider.createIndexes(integration.randomDbName(), "foo", [{ key: { foo: 1 } }]);
});

it("returns an just the regular indexes", async () => {
Copy link

Copilot AI Oct 15, 2025

Choose a reason for hiding this comment

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

Correct grammar by removing "an": change to "returns just the regular indexes".

Suggested change
it("returns an just the regular indexes", async () => {
it("returns just the regular indexes", async () => {

Copilot uses AI. Check for mistakes.

Copy link
Contributor

📊 Accuracy Test Results

📈 Summary

Metric Value
Commit SHA 5f3485396880a69c27a2b60922290b3c37d8db96
Run ID 1d7a8502-4feb-4c88-bab0-bfa87cd3cb83
Status done
Total Prompts Evaluated 73
Models Tested 1
Average Accuracy 99.3%
Responses with 0% Accuracy 0
Responses with 75% Accuracy 2
Responses with 100% Accuracy 71

📊 Baseline Comparison

Metric Value
Baseline Commit 1cf6f6dbed304379efe2a69791e659e34c0c2d9a
Baseline Run ID 4c65ec8d-4ff8-4857-954f-607c272e4c31
Baseline Run Status done
Responses Improved 2
Responses Regressed 1

📎 Download Full HTML Report - Look for the accuracy-test-summary artifact for detailed results.

Report generated on: 10/15/2025, 4:34:06 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant