• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mongodb-js / mongodb-mcp-server / 15063490200

16 May 2025 07:51AM UTC coverage: 73.774%. First build
15063490200

Pull #258

github

web-flow
Merge 047c85483 into 298adf4a5
Pull Request #258: feat: listSearchIndexes now lists index status info

209 of 368 branches covered (56.79%)

Branch coverage included in aggregate %.

0 of 1 new or added line in 1 file covered. (0.0%)

829 of 1039 relevant lines covered (79.79%)

54.59 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

57.14
/src/tools/mongodb/delete/dropSearchIndex.ts
1
import { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
2
import { SearchIndexOperationArgs, MongoDBToolBase } from "../mongodbTool.js";
3
import { ToolArgs, OperationType } from "../../tool.js";
4

5
export class DropSearchIndexTool extends MongoDBToolBase {
6
    protected name = "drop-search-index";
34✔
7
    protected description = "Deletes a text or vector search index from the database.";
34✔
8
    protected argsShape = {
34✔
9
        ...SearchIndexOperationArgs,
10
    };
11
    protected operationType: OperationType = "delete";
34✔
12

13
    protected async execute({
14
        database,
15
        collection,
16
        searchIndexName,
17
    }: ToolArgs<typeof this.argsShape>): Promise<CallToolResult> {
18
        const provider = await this.ensureConnected();
×
19
        await provider.dropSearchIndex(database, collection, searchIndexName);
×
20
        return {
×
21
            content: [
22
                {
23
                    text: `Successfully dropped index ${searchIndexName} from database ${database}`,
24
                    type: "text",
25
                },
26
            ],
27
        };
28
    }
29
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc