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

mongodb-js / mongodb-mcp-server / 16123662219

07 Jul 2025 05:25PM UTC coverage: 60.879% (-13.3%) from 74.187%
16123662219

Pull #343

github

web-flow
Merge 24298edad into 5b7ba55e0
Pull Request #343: fix: turn atlas-connect-cluster async

183 of 411 branches covered (44.53%)

Branch coverage included in aggregate %.

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

129 existing lines in 15 files now uncovered.

704 of 1046 relevant lines covered (67.3%)

59.03 hits per line

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

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

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

11
    protected async execute(): Promise<CallToolResult> {
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.");
1✔
16
        }
17

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