Skip to main content
Glama
chzkyy

mcp-mongodb

by chzkyy

update_one

Update the first MongoDB document matching a filter using operators like $set or $inc. Specify collection, optional database, and upsert to insert if no match.

Instructions

Perbarui DOKUMEN PERTAMA yang cocok dengan filter menggunakan operator update.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filterNoQuery filter MongoDB. Contoh: {"status": "aktif", "umur": {"$gt": 25}}. Kirim sebagai objek atau string JSON. Gunakan {} untuk semua dokumen.
updateNoDokumen update MongoDB. Gunakan operator seperti {"$set": {"umur": 31}} atau {"$inc": {"counter": 1}}. Tanpa operator akan otomatis dibungkus "$set".
upsertNoJika true, dokumen baru dibuat bila tidak ada yang cocok dengan filter (default false).
databaseNoNama database tujuan. Opsional jika MONGODB_DB sudah diatur.
collectionYesNama koleksi.

Latest Blog Posts

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/chzkyy/mcp_mongodb'

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