File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 1
1
import { CallToolResult } from "@modelcontextprotocol/sdk/types.js" ;
2
- import { DbOperationArgs , DbOperationType , MongoDBToolBase } from "../mongodbTool.js" ;
3
- import { ToolArgs } from "../../tool.js" ;
2
+ import { DbOperationArgs , MongoDBToolBase } from "../mongodbTool.js" ;
3
+ import { OperationType , ToolArgs } from "../../tool.js" ;
4
4
5
5
export class CreateCollectionTool extends MongoDBToolBase {
6
6
protected name = "create-collection" ;
7
7
protected description =
8
8
"Creates a new collection in a database. If the database doesn't exist, it will be created automatically." ;
9
9
protected argsShape = DbOperationArgs ;
10
10
11
- protected operationType : DbOperationType = "create" ;
11
+ protected operationType : OperationType = "create" ;
12
12
13
13
protected async execute ( { collection, database } : ToolArgs < typeof this . argsShape > ) : Promise < CallToolResult > {
14
14
const provider = await this . ensureConnected ( ) ;
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import fs from "fs/promises";
7
7
import { Session } from "../../src/session.js" ;
8
8
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js" ;
9
9
import { MongoClient } from "mongodb" ;
10
+ import { toIncludeAllMembers } from "jest-extended" ;
10
11
11
12
interface ParameterInfo {
12
13
name : string ;
You can’t perform that action at this time.
0 commit comments