You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
protecteddescription="Describe the schema for a collection";
14
16
protectedargsShape={
15
17
...DbOperationArgs,
16
18
sampleSize: z.number().optional().default(50).describe("Number of documents to sample for schema inference"),
17
-
responseBytesLimit: z.number().optional().default(ONE_MB).describe(`The maximum number of bytes to return in the response. This value is capped by the server’s configured maxBytesPerQuery and cannot be exceeded.`),
19
+
responseBytesLimit: z
20
+
.number()
21
+
.optional()
22
+
.default(ONE_MB)
23
+
.describe(
24
+
`The maximum number of bytes to return in the response. This value is capped by the server’s configured maxBytesPerQuery and cannot be exceeded.`
25
+
),
18
26
};
19
27
20
28
publicoperationType: OperationType="metadata";
@@ -24,7 +32,9 @@ export class CollectionSchemaTool extends MongoDBToolBase {
description: "Number of documents to sample for schema inference",
28
-
required: false,
29
-
},
30
-
{
31
-
name: "responseBytesLimit",
32
-
type: "number",
33
-
description: `The maximum number of bytes to return in the response. This value is capped by the server’s configured maxBytesPerQuery and cannot be exceeded.`,
34
-
required: false,
35
-
}
36
-
]
37
-
);
18
+
validateToolMetadata(integration,"collection-schema","Describe the schema for a collection",[
19
+
...databaseCollectionParameters,
20
+
{
21
+
name: "sampleSize",
22
+
type: "number",
23
+
description: "Number of documents to sample for schema inference",
24
+
required: false,
25
+
},
26
+
{
27
+
name: "responseBytesLimit",
28
+
type: "number",
29
+
description: `The maximum number of bytes to return in the response. This value is capped by the server’s configured maxBytesPerQuery and cannot be exceeded.`,
0 commit comments