• 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

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

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

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

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

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