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

mongodb-js / mongodb-mcp-server / 14497020180

16 Apr 2025 03:50PM UTC coverage: 51.208% (+0.2%) from 50.98%
14497020180

Pull #82

github

blva
lint
Pull Request #82: add create project tool

23 of 145 branches covered (15.86%)

Branch coverage included in aggregate %.

8 of 12 new or added lines in 2 files covered. (66.67%)

4 existing lines in 1 file now uncovered.

401 of 683 relevant lines covered (58.71%)

37.31 hits per line

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

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

7
export class CreateProjectTool extends AtlasToolBase {
6✔
8
    protected name = "atlas-create-project";
42✔
9
    protected description = "Create a MongoDB Atlas project";
42✔
10
    protected operationType: OperationType = "create";
42✔
11
    protected argsShape = {
42✔
12
        projectName: z.string().describe("Name for the new project"),
13
        organizationId: z.string().describe("Organization ID for the new project"),
14
    };
15

16
    protected async execute({ projectName, organizationId }: ToolArgs<typeof this.argsShape>): Promise<CallToolResult> {
NEW
17
        this.session.ensureAuthenticated();
×
18

NEW
19
        const input = {
×
20
            name: projectName,
21
            orgId: organizationId,
22
        } as Group;
23

NEW
24
        await this.session.apiClient.createProject({
×
25
            body: input,
26
        });
27

NEW
28
        return {
×
29
            content: [{ type: "text", text: `Project "${projectName}" created successfully.` }],
30
        };
31
    }
32
}
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