Skip to main content
Glama
Pawangunjkar

DB MCP Server

by Pawangunjkar

mongo_update

Update MongoDB documents by applying operators like $set to matching filter criteria, with empty filters rejected to prevent accidental full-collection updates.

Instructions

Update MongoDB documents. update_json should include operators such as $set. Empty filters are refused.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
databaseYes
collectionYes
filter_jsonYes
update_jsonYes
session_nameNodefault

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.7/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 behavioral burden. It does disclose that empty filters are refused, which is useful, and that update_json should use operators like $set. However, it omits critical behaviors: whether it updates a single document or multiple, whether it returns a result (e.g., modified count), and how it handles errors like invalid JSON or missing collections. These gaps could lead an agent to misuse the tool.

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 concise, using only two sentences with no fluff. The purpose is front-loaded, and the key constraint about update_json is stated clearly. However, it could be slightly more structured by separating the behavioral warning (empty filters) into its own sentence for emphasis, but overall it is appropriately sized.

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?

The tool has 5 parameters, no annotations, no parameter descriptions, and only a minimal description. While an output schema exists (which might cover return values), the description does not address important context: whether updates are limited to one document, whether a connection is required, or what happens when no documents match the filter. The description is too sparse for a mutation tool that could have significant side effects.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate by explaining parameters. It adds meaning to update_json by specifying the need for operators like $set, and it implies filter_json must not be empty. But it offers no explanation for database, collection, or session_name. Given the zero coverage, this is insufficient; an agent would have to infer the meaning of most parameters from their names alone.

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 MongoDB documents, which distinguishes it from read, insert, and delete siblings like mongo_find, mongo_insert, and mongo_delete. However, it does not explicitly mention that it updates documents matching a filter, which is a minor specificity gap given the filter_json parameter.

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?

The description provides no guidance on when to use this tool versus alternatives such as db_update (for SQL) or other mongo_* tools. It does not mention prerequisites like an active connection, nor does it suggest pairing with mongo_find for verification. The only usage hint is the requirement that update_json include operators like $set, but that pertains to parameter formatting rather than tool selection.

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