Skip to content

Commit d78d7f6

Browse files
committed
fix: remove limit
1 parent e51e7ed commit d78d7f6

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/tools/mongodb/metadata/explain.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,8 @@ export class ExplainTool extends MongoDBToolBase {
5353
let result: Document;
5454
switch (method.name) {
5555
case "aggregate": {
56-
const { pipeline, limit } = method.arguments;
57-
result = await provider
58-
.aggregate(database, collection, pipeline)
59-
.limit(limit)
60-
.explain(ExplainTool.defaultVerbosity);
56+
const { pipeline } = method.arguments;
57+
result = await provider.aggregate(database, collection, pipeline).explain(ExplainTool.defaultVerbosity);
6158
break;
6259
}
6360
case "find": {

src/tools/mongodb/read/aggregate.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@ export class AggregateTool extends MongoDBToolBase {
2121
database,
2222
collection,
2323
pipeline,
24-
limit,
2524
}: ToolArgs<typeof this.argsShape>): Promise<CallToolResult> {
2625
const provider = this.ensureConnected();
27-
const documents = await provider.aggregate(database, collection, pipeline).limit(limit).toArray();
26+
const documents = await provider.aggregate(database, collection, pipeline).toArray();
2827

2928
const content: Array<{ text: string; type: "text" }> = [
3029
{

0 commit comments

Comments
 (0)