Skip to main content
Glama

MongoDB MCP Server

Official
by mongodb-js
Apache 2.0
8,598
430
  • Apple
  • Linux

update-many

Update multiple documents in a MongoDB collection by specifying a filter and applying modifications; supports upsert for inserting new documents if no matches are found.

Instructions

Updates all documents that match the specified filter for a collection

Input Schema

NameRequiredDescriptionDefault
collectionYesCollection name
databaseYesDatabase name
filterNoThe selection criteria for the update, matching the syntax of the filter argument of db.collection.updateOne()
updateYesAn update document describing the modifications to apply using update operator expressions
upsertNoControls whether to insert a new document if no documents match the filter

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "collection": { "description": "Collection name", "type": "string" }, "database": { "description": "Database name", "type": "string" }, "filter": { "additionalProperties": true, "description": "The selection criteria for the update, matching the syntax of the filter argument of db.collection.updateOne()", "properties": {}, "type": "object" }, "update": { "additionalProperties": true, "description": "An update document describing the modifications to apply using update operator expressions", "properties": {}, "type": "object" }, "upsert": { "description": "Controls whether to insert a new document if no documents match the filter", "type": "boolean" } }, "required": [ "database", "collection", "update" ], "type": "object" }
Install Server

Other Tools from MongoDB MCP Server

Related Tools

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mongodb-js/mongodb-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server