• 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

90.0
/src/tools/atlas/read/inspectAccessList.ts
1
import { z } from "zod";
2✔
2
import { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
3
import { AtlasToolBase } from "../atlasTool.js";
2✔
4
import { ToolArgs, OperationType } from "../../tool.js";
5

6
export class InspectAccessListTool extends AtlasToolBase {
2✔
7
    public name = "atlas-inspect-access-list";
34✔
8
    protected description = "Inspect Ip/CIDR ranges with access to your MongoDB Atlas clusters.";
34✔
9
    public operationType: OperationType = "read";
34✔
10
    protected argsShape = {
34✔
11
        projectId: z.string().describe("Atlas project ID"),
34✔
12
    };
34✔
13

14
    protected async execute({ projectId }: ToolArgs<typeof this.argsShape>): Promise<CallToolResult> {
2✔
15
        const accessList = await this.session.apiClient.listProjectIpAccessLists({
1✔
16
            params: {
1✔
17
                path: {
1✔
18
                    groupId: projectId,
1✔
19
                },
1✔
20
            },
1✔
21
        });
1✔
22

23
        if (!accessList?.results?.length) {
1!
24
            throw new Error("No access list entries found.");
×
UNCOV
25
        }
×
26

27
        return {
1✔
28
            content: [
1✔
29
                {
1✔
30
                    type: "text",
1✔
31
                    text: `IP ADDRESS | CIDR | COMMENT
1✔
32
------|------|------
33
${(accessList.results || [])
1!
34
    .map((entry) => {
1✔
35
        return `${entry.ipAddress} | ${entry.cidrBlock} | ${entry.comment}`;
5✔
36
    })
1✔
37
    .join("\n")}`,
1✔
38
                },
1✔
39
            ],
1✔
40
        };
1✔
41
    }
1✔
42
}
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