Skip to main content
Glama
chzkyy

mcp-mongodb

by chzkyy

update_many

Update all MongoDB documents matching a filter. Use update operators like $set or $inc; optionally insert a new document with upsert if none match.

Instructions

Perbarui SEMUA dokumen 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It only states the tool updates all matching documents but does not mention potential side effects, atomicity, limits, permission requirements, or return value. Given the destructive potential of a bulk update, this is insufficient transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence that immediately states the verb and resource. It has no unnecessary words and is front-loaded. However, its extreme brevity borders on under-specification, though for pure conciseness it earns a 4.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 5 parameters (including complex object types), no output schema, and no annotations, the description is insufficient. It lacks guidance on risks, expected behavior, or return format. An agent would not have enough contextual information to safely invoke this bulk update tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema descriptions cover all five parameters (100% coverage), including clear examples for filter and update objects. The description adds no additional meaning beyond what the schema already provides, so the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool updates ALL documents matching a filter, using an update operator. The word 'SEMUA' explicitly differentiates it from update_one and replace_one, making the core purpose unambiguous. However, it does not mention any limitations or nuances, so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like update_one or replace_one. The description does not mention typical scenarios, prerequisites, or exclusions, leaving an agent to infer usage solely from the name and schema. This is a significant gap for a bulk operation that could affect many records.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.