updateOne
Update a single MongoDB document that matches a filter, with optional upsert to create it when no match exists.
Instructions
Update a single document in a MongoDB collection
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": "updateOne"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filter | Yes | Filter to find document | |
| update | Yes | Update operations | |
| upsert | No | Create if not exists | |
| collection | Yes | Collection name |