update_document
Modify an existing document in a MongoDB collection by providing the collection name, document ID, and a JSON string of fields to update.
Instructions
Update an existing document in a 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_name": "<collection_name>",
"document_id": "<document_id>",
"update_json": "<update_json>"
},
"name": "update_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| document_id | Yes | The MongoDB object ID of the document to update | |
| update_json | Yes | JSON string with the fields to update | |
| collection_name | Yes | Name of the collection |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||