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

mongodb-js / mongodb-mcp-server / 17657973871

11 Sep 2025 09:37PM UTC coverage: 81.59% (+0.4%) from 81.188%
17657973871

Pull #524

github

web-flow
Merge 7617674d0 into d6b84c7bd
Pull Request #524: chore: update smithery dockerfile to be closer to the official one

962 of 1279 branches covered (75.22%)

Branch coverage included in aggregate %.

4866 of 5864 relevant lines covered (82.98%)

46.3 hits per line

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

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

6
export const InspectAccessListArgs = {
2✔
7
    projectId: AtlasArgs.projectId().describe("Atlas project ID"),
2✔
8
};
2✔
9

10
export class InspectAccessListTool extends AtlasToolBase {
2✔
11
    public name = "atlas-inspect-access-list";
61✔
12
    protected description = "Inspect Ip/CIDR ranges with access to your MongoDB Atlas clusters.";
61✔
13
    public operationType: OperationType = "read";
61✔
14
    protected argsShape = {
61✔
15
        ...InspectAccessListArgs,
61✔
16
    };
61✔
17

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

27
        const results = accessList.results ?? [];
1!
28

29
        if (!results.length) {
1!
30
            return {
×
31
                content: [{ type: "text", text: "No access list entries found." }],
×
32
            };
×
33
        }
×
34

35
        return {
1✔
36
            content: formatUntrustedData(
1✔
37
                `Found ${results.length} access list entries`,
1✔
38
                `IP ADDRESS | CIDR | COMMENT
1✔
39
------|------|------
40
${results
1✔
41
    .map((entry) => {
1✔
42
        return `${entry.ipAddress} | ${entry.cidrBlock} | ${entry.comment}`;
5✔
43
    })
1✔
44
    .join("\n")}`
1✔
45
            ),
1✔
46
        };
1✔
47
    }
1✔
48
}
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