mongo-update-document
Update documents in MongoDB collections using query filters and update operations. Modify single or multiple documents with JSON-based update commands for database management.
Instructions
Update documents in a MongoDB collection
Input Schema
Name | Required | Description | Default |
---|---|---|---|
collection | Yes | Collection name | |
database | Yes | Database name | |
filter | Yes | Query filter to match documents to update | |
update | Yes | Update operations as JSON object | |
updateMany | No | Whether to update multiple documents (default: false) |
Input Schema (JSON Schema)
{
"properties": {
"collection": {
"description": "Collection name",
"type": "string"
},
"database": {
"description": "Database name",
"type": "string"
},
"filter": {
"additionalProperties": {},
"description": "Query filter to match documents to update",
"type": "object"
},
"update": {
"additionalProperties": {},
"description": "Update operations as JSON object",
"type": "object"
},
"updateMany": {
"description": "Whether to update multiple documents (default: false)",
"type": "boolean"
}
},
"required": [
"database",
"collection",
"filter",
"update"
],
"type": "object"
}