• 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

23.53
/src/tools/atlas/read/inspectCluster.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
import { Cluster, inspectCluster } from "../../../common/atlas/cluster.js";
6

7
export class InspectClusterTool extends AtlasToolBase {
8
    protected name = "atlas-inspect-cluster";
33✔
9
    protected description = "Inspect MongoDB Atlas cluster";
33✔
10
    protected operationType: OperationType = "read";
33✔
11
    protected argsShape = {
33✔
12
        projectId: z.string().describe("Atlas project ID"),
13
        clusterName: z.string().describe("Atlas cluster name"),
14
    };
15

16
    protected async execute({ projectId, clusterName }: ToolArgs<typeof this.argsShape>): Promise<CallToolResult> {
UNCOV
17
        const cluster = await inspectCluster(this.session.apiClient, projectId, clusterName);
×
18

UNCOV
19
        return this.formatOutput(cluster);
×
20
    }
21

22
    private formatOutput(formattedCluster: Cluster): CallToolResult {
UNCOV
23
        return {
×
24
            content: [
25
                {
26
                    type: "text",
27
                    text: `Cluster Name | Cluster Type | Tier | State | MongoDB Version | Connection String
28
----------------|----------------|----------------|----------------|----------------|----------------
29
${formattedCluster.name || "Unknown"} | ${formattedCluster.instanceType} | ${formattedCluster.instanceSize || "N/A"} | ${formattedCluster.state || "UNKNOWN"} | ${formattedCluster.mongoDBVersion || "N/A"} | ${formattedCluster.connectionString || "N/A"}`,
×
30
                },
31
            ],
32
        };
33
    }
34
}
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