diff --git a/docs/en/resources/tools/mongodb/mongodb-delete-many.md b/docs/en/resources/tools/mongodb/mongodb-delete-many.md index dd0e1fbde5..9e35a72124 100644 --- a/docs/en/resources/tools/mongodb/mongodb-delete-many.md +++ b/docs/en/resources/tools/mongodb/mongodb-delete-many.md @@ -54,4 +54,4 @@ tools: | database | string | true | The name of the MongoDB database containing the collection. | | collection | string | true | The name of the MongoDB collection from which to delete documents. | | filterPayload | string | true | The MongoDB query filter document to select the documents for deletion. Uses `{{json .param_name}}` for templating. | -| filterParams | list | true | A list of parameter objects that define the variables used in the `filterPayload`. | +| filterParams | list | false | A list of parameter objects that define the variables used in the `filterPayload`. | diff --git a/docs/en/resources/tools/mongodb/mongodb-delete-one.md b/docs/en/resources/tools/mongodb/mongodb-delete-one.md index a4d51e4f82..0cede56c13 100644 --- a/docs/en/resources/tools/mongodb/mongodb-delete-one.md +++ b/docs/en/resources/tools/mongodb/mongodb-delete-one.md @@ -58,4 +58,4 @@ tools: | database | string | true | The name of the MongoDB database containing the collection. | | collection | string | true | The name of the MongoDB collection from which to delete a document. | | filterPayload | string | true | The MongoDB query filter document to select the document for deletion. Uses `{{json .param_name}}` for templating. | -| filterParams | list | true | A list of parameter objects that define the variables used in the `filterPayload`. | +| filterParams | list | false | A list of parameter objects that define the variables used in the `filterPayload`. | diff --git a/docs/en/resources/tools/mongodb/mongodb-find-one.md b/docs/en/resources/tools/mongodb/mongodb-find-one.md index 86959c0939..67e0cca1ce 100644 --- a/docs/en/resources/tools/mongodb/mongodb-find-one.md +++ b/docs/en/resources/tools/mongodb/mongodb-find-one.md @@ -61,7 +61,7 @@ tools: | database | string | true | The name of the MongoDB database to query. | | collection | string | true | The name of the MongoDB collection to query. | | filterPayload | string | true | The MongoDB query filter document to select the document. Uses `{{json .param_name}}` for templating. | -| filterParams | list | true | A list of parameter objects that define the variables used in the `filterPayload`. | +| filterParams | list | false | A list of parameter objects that define the variables used in the `filterPayload`. | | projectPayload | string | false | An optional MongoDB projection document to specify which fields to include (1) or exclude (0) in the result. | | projectParams | list | false | A list of parameter objects for the `projectPayload`. | | sortPayload | string | false | An optional MongoDB sort document. Useful for selecting which document to return if the filter matches multiple (e.g., get the most recent). | diff --git a/docs/en/resources/tools/mongodb/mongodb-find.md b/docs/en/resources/tools/mongodb/mongodb-find.md index 80d1839bca..d927c737c1 100644 --- a/docs/en/resources/tools/mongodb/mongodb-find.md +++ b/docs/en/resources/tools/mongodb/mongodb-find.md @@ -68,7 +68,7 @@ tools: | database | string | true | The name of the MongoDB database to query. | | collection | string | true | The name of the MongoDB collection to query. | | filterPayload | string | true | The MongoDB query filter document to select which documents to return. Uses `{{json .param_name}}` for templating. | -| filterParams | list | true | A list of parameter objects that define the variables used in the `filterPayload`. | +| filterParams | list | false | A list of parameter objects that define the variables used in the `filterPayload`. | | projectPayload | string | false | An optional MongoDB projection document to specify which fields to include (1) or exclude (0) in the results. | | projectParams | list | false | A list of parameter objects for the `projectPayload`. | | sortPayload | string | false | An optional MongoDB sort document to define the order of the returned documents. Use 1 for ascending and -1 for descending. | diff --git a/docs/en/resources/tools/mongodb/mongodb-update-many.md b/docs/en/resources/tools/mongodb/mongodb-update-many.md index 0a856ccbe2..2ed8a1fb6d 100644 --- a/docs/en/resources/tools/mongodb/mongodb-update-many.md +++ b/docs/en/resources/tools/mongodb/mongodb-update-many.md @@ -65,7 +65,7 @@ tools: | database | string | true | The name of the MongoDB database containing the collection. | | collection | string | true | The name of the MongoDB collection in which to update documents. | | filterPayload | string | true | The MongoDB query filter document to select the documents for updating. It's written as a Go template, using `{{json .param_name}}` to insert parameters. | -| filterParams | list | true | A list of parameter objects that define the variables used in the `filterPayload`. | +| filterParams | list | false | A list of parameter objects that define the variables used in the `filterPayload`. | | updatePayload | string | true | The MongoDB update document, It's written as a Go template, using `{{json .param_name}}` to insert parameters. | | updateParams | list | true | A list of parameter objects that define the variables used in the `updatePayload`. | | canonical | bool | true | Determines if the `filterPayload` and `updatePayload` strings are parsed using MongoDB's Canonical or Relaxed Extended JSON format. **Canonical** is stricter about type representation, while **Relaxed** is more lenient. | diff --git a/docs/en/resources/tools/mongodb/mongodb-update-one.md b/docs/en/resources/tools/mongodb/mongodb-update-one.md index 2536c1e308..7ecf0662aa 100644 --- a/docs/en/resources/tools/mongodb/mongodb-update-one.md +++ b/docs/en/resources/tools/mongodb/mongodb-update-one.md @@ -65,7 +65,7 @@ tools: | database | string | true | The name of the MongoDB database containing the collection. | | collection | string | true | The name of the MongoDB collection to update a document in. | | filterPayload | string | true | The MongoDB query filter document to select the document for updating. It's written as a Go template, using `{{json .param_name}}` to insert parameters. | -| filterParams | list | true | A list of parameter objects that define the variables used in the `filterPayload`. | +| filterParams | list | false | A list of parameter objects that define the variables used in the `filterPayload`. | | updatePayload | string | true | The MongoDB update document, which specifies the modifications. This often uses update operators like `$set`. It's written as a Go template, using `{{json .param_name}}` to insert parameters. | | updateParams | list | true | A list of parameter objects that define the variables used in the `updatePayload`. | | canonical | bool | true | Determines if the `updatePayload` string is parsed using MongoDB's Canonical or Relaxed Extended JSON format. **Canonical** is stricter about type representation (e.g., `{"$numberInt": "42"}`), while **Relaxed** is more lenient (e.g., `42`). | diff --git a/internal/tools/mongodb/mongodbdeletemany/mongodbdeletemany.go b/internal/tools/mongodb/mongodbdeletemany/mongodbdeletemany.go index 6f97baa5a1..7b6d37fffe 100644 --- a/internal/tools/mongodb/mongodbdeletemany/mongodbdeletemany.go +++ b/internal/tools/mongodb/mongodbdeletemany/mongodbdeletemany.go @@ -54,7 +54,7 @@ type Config struct { Database string `yaml:"database" validate:"required"` Collection string `yaml:"collection" validate:"required"` FilterPayload string `yaml:"filterPayload" validate:"required"` - FilterParams tools.Parameters `yaml:"filterParams" validate:"required"` + FilterParams tools.Parameters `yaml:"filterParams"` } // validate interface diff --git a/internal/tools/mongodb/mongodbdeleteone/mongodbdeleteone.go b/internal/tools/mongodb/mongodbdeleteone/mongodbdeleteone.go index bde13a8bad..4a7ef50815 100644 --- a/internal/tools/mongodb/mongodbdeleteone/mongodbdeleteone.go +++ b/internal/tools/mongodb/mongodbdeleteone/mongodbdeleteone.go @@ -53,7 +53,7 @@ type Config struct { Database string `yaml:"database" validate:"required"` Collection string `yaml:"collection" validate:"required"` FilterPayload string `yaml:"filterPayload" validate:"required"` - FilterParams tools.Parameters `yaml:"filterParams" validate:"required"` + FilterParams tools.Parameters `yaml:"filterParams"` } // validate interface diff --git a/internal/tools/mongodb/mongodbfindone/mongodbfindone.go b/internal/tools/mongodb/mongodbfindone/mongodbfindone.go index ea39baa67a..d599f5eb41 100644 --- a/internal/tools/mongodb/mongodbfindone/mongodbfindone.go +++ b/internal/tools/mongodb/mongodbfindone/mongodbfindone.go @@ -54,7 +54,7 @@ type Config struct { Database string `yaml:"database" validate:"required"` Collection string `yaml:"collection" validate:"required"` FilterPayload string `yaml:"filterPayload" validate:"required"` - FilterParams tools.Parameters `yaml:"filterParams" validate:"required"` + FilterParams tools.Parameters `yaml:"filterParams"` ProjectPayload string `yaml:"projectPayload"` ProjectParams tools.Parameters `yaml:"projectParams"` SortPayload string `yaml:"sortPayload"` diff --git a/internal/tools/mongodb/mongodbupdatemany/mongodbupdatemany.go b/internal/tools/mongodb/mongodbupdatemany/mongodbupdatemany.go index cb1747da64..e74f6329a0 100644 --- a/internal/tools/mongodb/mongodbupdatemany/mongodbupdatemany.go +++ b/internal/tools/mongodb/mongodbupdatemany/mongodbupdatemany.go @@ -52,7 +52,7 @@ type Config struct { Database string `yaml:"database" validate:"required"` Collection string `yaml:"collection" validate:"required"` FilterPayload string `yaml:"filterPayload" validate:"required"` - FilterParams tools.Parameters `yaml:"filterParams" validate:"required"` + FilterParams tools.Parameters `yaml:"filterParams"` UpdatePayload string `yaml:"updatePayload" validate:"required"` UpdateParams tools.Parameters `yaml:"updateParams" validate:"required"` Canonical bool `yaml:"canonical" validate:"required"` @@ -127,7 +127,7 @@ type Tool struct { Description string `yaml:"description"` Collection string `yaml:"collection"` FilterPayload string `yaml:"filterPayload" validate:"required"` - FilterParams tools.Parameters `yaml:"filterParams" validate:"required"` + FilterParams tools.Parameters `yaml:"filterParams"` UpdatePayload string `yaml:"updatePayload" validate:"required"` UpdateParams tools.Parameters `yaml:"updateParams" validate:"required"` AllParams tools.Parameters `yaml:"allParams"` diff --git a/internal/tools/mongodb/mongodbupdateone/mongodbupdateone.go b/internal/tools/mongodb/mongodbupdateone/mongodbupdateone.go index d40d80cf9c..09a5e2f6bf 100644 --- a/internal/tools/mongodb/mongodbupdateone/mongodbupdateone.go +++ b/internal/tools/mongodb/mongodbupdateone/mongodbupdateone.go @@ -52,7 +52,7 @@ type Config struct { Database string `yaml:"database" validate:"required"` Collection string `yaml:"collection" validate:"required"` FilterPayload string `yaml:"filterPayload" validate:"required"` - FilterParams tools.Parameters `yaml:"filterParams" validate:"required"` + FilterParams tools.Parameters `yaml:"filterParams"` UpdatePayload string `yaml:"updatePayload" validate:"required"` UpdateParams tools.Parameters `yaml:"updateParams" validate:"required"`