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

mongodb-js / mongodb-mcp-server / 16292877152

15 Jul 2025 12:10PM UTC coverage: 77.385% (+2.1%) from 75.27%
16292877152

push

github

web-flow
chore(tests): switch to vitest (#363)

498 of 687 branches covered (72.49%)

Branch coverage included in aggregate %.

0 of 27 new or added lines in 2 files covered. (0.0%)

293 existing lines in 26 files now uncovered.

2828 of 3611 relevant lines covered (78.32%)

28.46 hits per line

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

88.89
/src/tools/atlas/read/listOrgs.ts
1
import { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
2
import { AtlasToolBase } from "../atlasTool.js";
2✔
3
import { OperationType } from "../../tool.js";
4

5
export class ListOrganizationsTool extends AtlasToolBase {
2✔
6
    public name = "atlas-list-orgs";
34✔
7
    protected description = "List MongoDB Atlas organizations";
34✔
8
    public operationType: OperationType = "read";
34✔
9
    protected argsShape = {};
34✔
10

11
    protected async execute(): Promise<CallToolResult> {
2✔
12
        const data = await this.session.apiClient.listOrganizations();
1✔
13

14
        if (!data?.results?.length) {
1!
15
            throw new Error("No projects found in your MongoDB Atlas account.");
×
UNCOV
16
        }
×
17

18
        // Format projects as a table
19
        const output =
1✔
20
            `Organization Name | Organization ID
1✔
21
----------------| ----------------
22
` +
23
            data.results
1✔
24
                .map((org) => {
1✔
25
                    return `${org.name} | ${org.id}`;
1✔
26
                })
1✔
27
                .join("\n");
1✔
28
        return {
1✔
29
            content: [{ type: "text", text: output }],
1✔
30
        };
1✔
31
    }
1✔
32
}
2✔
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