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
description: `An array of aggregation stages to execute.
31
-
\`$vectorSearch\` **MUST** be the first stage of the pipeline, or the first stage of a \`$unionWith\` subpipeline.
32
-
### Usage Rules for \`$vectorSearch\`
33
-
- **Unset embeddings:**
34
-
Unless the user explicitly requests the embeddings, add an \`$unset\` stage **at the end of the pipeline** to remove the embedding field and avoid context limits. **The $unset stage in this situation is mandatory**.
35
-
- **Pre-filtering:**
36
-
If the user requests additional filtering, include filters in \`$vectorSearch.filter\` only for pre-filter fields in the vector index.
37
-
NEVER include fields in $vectorSearch.filter that are not part of the vector index.
38
-
- **Post-filtering:**
39
-
For all remaining filters, add a $match stage after $vectorSearch.
40
-
### Note to LLM
41
-
- If unsure which fields are filterable, use the collection-indexes tool to determine valid prefilter fields.
42
-
- If no requested filters are valid prefilters, omit the filter key from $vectorSearch.`,
30
+
description: "An array of aggregation stages to execute.",
validateToolMetadata(integration,"aggregate","Run an aggregation against a MongoDB collection",[
398
+
...databaseCollectionParameters,
399
+
{
400
+
name: "pipeline",
401
+
description: `An array of aggregation stages to execute.
402
+
\`$vectorSearch\` **MUST** be the first stage of the pipeline, or the first stage of a \`$unionWith\` subpipeline.
403
+
### Usage Rules for \`$vectorSearch\`
404
+
- **Unset embeddings:**
405
+
Unless the user explicitly requests the embeddings, add an \`$unset\` stage **at the end of the pipeline** to remove the embedding field and avoid context limits. **The $unset stage in this situation is mandatory**.
406
+
- **Pre-filtering:**
407
+
If the user requests additional filtering, include filters in \`$vectorSearch.filter\` only for pre-filter fields in the vector index.
408
+
NEVER include fields in $vectorSearch.filter that are not part of the vector index.
409
+
- **Post-filtering:**
410
+
For all remaining filters, add a $match stage after $vectorSearch.
411
+
### Note to LLM
412
+
- If unsure which fields are filterable, use the collection-indexes tool to determine valid prefilter fields.
413
+
- If no requested filters are valid prefilters, omit the filter key from $vectorSearch.`,
414
+
type: "array",
415
+
required: true,
416
+
},
417
+
{
418
+
name: "responseBytesLimit",
419
+
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. Note to LLM: If the entire aggregation result is required, use the "export" tool instead of increasing this limit.`,
420
+
type: "number",
421
+
required: false,
422
+
},
423
+
]);
424
+
409
425
it("should throw an exception when using an index that does not exist",async()=>{
0 commit comments