Skip to content

Commit 39b428d

Browse files
committed
fix more tests
1 parent 85955b0 commit 39b428d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/tools/mongodb/metadata/explain.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export class ExplainTool extends MongoDBToolBase {
1616
...DbOperationArgs,
1717
method: z
1818
.array(
19-
z.union([
19+
z.discriminatedUnion("name", [
2020
z.object({
2121
name: z.literal("aggregate"),
2222
arguments: z.object(AggregateArgs),

src/tools/mongodb/read/aggregate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { EJSON } from "bson";
66
import { checkIndexUsage } from "../../../helpers/indexCheck.js";
77

88
export const AggregateArgs = {
9-
pipeline: z.array(z.record(z.string(), z.unknown())).describe("An array of aggregation stages to execute"),
9+
pipeline: z.array(z.object({}).passthrough()).describe("An array of aggregation stages to execute"),
1010
};
1111

1212
export class AggregateTool extends MongoDBToolBase {

0 commit comments

Comments
 (0)