mongo_update_one
Update a single document in MongoDB by providing a filter and an update document. Optionally enable upsert to insert if no match found.
Instructions
Update a single document matching filter in MongoDB. Blocked when readOnly mode is enabled.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"collection": "<collection>",
"filter": "<filter>",
"update": "<update>"
},
"name": "mongo_update_one"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filter | Yes | JSON string filter. | |
| update | Yes | JSON string update document (e.g. '{"$set":{"name":"new"}}'). | |
| upsert | No | ||
| database | No | ||
| collection | Yes | ||
| connectionId | No | Id of the mongodb connection to use. Optional when only one mongodb connection is configured. |