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

mongodb-js / mongodb-mcp-server / 14671884465

25 Apr 2025 07:17PM UTC coverage: 67.88% (-14.6%) from 82.446%
14671884465

Pull #134

github

web-flow
chore(deps-dev): bump mongodb-runner from 5.8.2 to 5.8.3

Bumps [mongodb-runner](https://github.com/mongodb-js/devtools-shared) from 5.8.2 to 5.8.3.
- [Commits](https://github.com/mongodb-js/devtools-shared/commits)

---
updated-dependencies:
- dependency-name: mongodb-runner
  dependency-version: 5.8.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Pull Request #134: chore(deps-dev): bump mongodb-runner from 5.8.2 to 5.8.3

99 of 212 branches covered (46.7%)

Branch coverage included in aggregate %.

628 of 859 relevant lines covered (73.11%)

43.31 hits per line

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

41.18
/src/tools/atlas/read/inspectCluster.ts
1
import { z } from "zod";
31✔
2
import { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
3
import { AtlasToolBase } from "../atlasTool.js";
31✔
4
import { ToolArgs, OperationType } from "../../tool.js";
5
import { ClusterDescription20240805 } from "../../../common/atlas/openapi.js";
6

7
export class InspectClusterTool extends AtlasToolBase {
31✔
8
    protected name = "atlas-inspect-cluster";
23✔
9
    protected description = "Inspect MongoDB Atlas cluster";
23✔
10
    protected operationType: OperationType = "read";
23✔
11
    protected argsShape = {
23✔
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> {
17
        const cluster = await this.session.apiClient.getCluster({
×
18
            params: {
19
                path: {
20
                    groupId: projectId,
21
                    clusterName,
22
                },
23
            },
24
        });
25

26
        return this.formatOutput(cluster);
×
27
    }
28

29
    private formatOutput(cluster?: ClusterDescription20240805): CallToolResult {
30
        if (!cluster) {
×
31
            throw new Error("Cluster not found");
×
32
        }
33

34
        return {
×
35
            content: [
36
                {
37
                    type: "text",
38
                    text: `Cluster Name | State | MongoDB Version | Connection String
39
----------------|----------------|----------------|----------------|----------------
40
${cluster.name} | ${cluster.stateName} | ${cluster.mongoDBVersion || "N/A"} | ${cluster.connectionStrings?.standard || "N/A"}`,
×
41
                },
42
            ],
43
        };
44
    }
45
}
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