Skip to main content
Glama
chzkyy

mcp-mongodb

by chzkyy

delete_many

Destructive

Delete all MongoDB documents matching a specified filter. Requires confirmation for empty filters to prevent accidental mass deletion.

Instructions

PERINGATAN: Hapus SEMUA dokumen yang cocok dengan filter! Filter kosong ({}) hanya diizinkan bila confirm: true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filterNoQuery filter MongoDB. Contoh: {"status": "aktif", "umur": {"$gt": 25}}. Kirim sebagai objek atau string JSON. Gunakan {} untuk semua dokumen.
confirmNoSet true untuk mengonfirmasi operasi destruktif.
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

A4.4/5.0
Behavior5/5

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

The all-caps PERINGATAN directly discloses that this is a destructive operation affecting all matching documents. It goes beyond the destructiveHint annotation by adding the critical guardrail that an empty filter is only allowed when confirm is true.

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

Conciseness5/5

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

The description is a single, front-loaded warning sentence with no filler. It immediately emphasizes the destructive scope and the confirmation rule, making the critical information easy to notice and act on.

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

Completeness4/5

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

The core behavior, destructive risk, and confirmation prerequisite are all covered, which is enough for safe invocation. Minor gaps remain: it does not clarify what happens when the filter parameter is omitted entirely, and it does not discuss alternatives, but the essential context is present.

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

Parameters4/5

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

The input schema already documents all four parameters, including filter examples and confirm semantics. The description adds meaningful extra context by highlighting the dangerous empty-filter case and the confirm requirement, enriching the meaning of the filter and confirm parameters.

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

Purpose5/5

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

The description states a specific operation: deleting ALL documents matching a filter, with an explicit warning. This distinguishes it from single-document operations like delete_one and from collection-level operations like drop_collection.

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

Usage Guidelines3/5

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

The description conveys clear context: this tool deletes every document matching the filter and imposes a confirm requirement for empty filters. However, it does not explicitly guide the agent toward this tool versus delete_one or drop_collection, so usage guidance is implied rather than fully stated.

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