Skip to main content
Glama
Vijayakumar-DevOps

MongoDB MCP Server

delete-many

Destructive

Delete all documents matching a filter from a MongoDB collection. Removes multiple records in one operation.

Instructions

Removes all documents that match the filter from a MongoDB collection

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filterNoThe query filter, specifying the deletion criteria. Matches the syntax of the filter argument of db.collection.deleteMany()
databaseYesDatabase name
collectionYesCollection name

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
databaseYes
collectionYes
deletedCountYes
Behavior3/5

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

The destructiveHint annotation already flags the destructive nature, and the description adds the scope of deletion (all matching documents). However, it fails to disclose the critical edge case that omitting the filter deletes all documents in the collection, which is a significant safety concern for a bulk deletion tool.

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 sentence that is front-loaded with the core action and resource. It contains no fluff or redundant information, making it highly concise and well-structured.

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

Completeness3/5

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

While the destructiveHint annotation and schema cover many aspects, the description misses a crucial safety warning about the empty-filter case, which can delete the entire collection. Given the tool's high destructiveness, the description should explicitly caution about this behavior. The description is adequate but not complete for such an operation.

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?

Schema description coverage is 100%, with each parameter (filter, database, collection) adequately described. The filter parameter includes a detailed reference to MongoDB's deleteMany syntax. The tool description itself adds no additional parameter semantics beyond what the schema already provides, so the baseline of 3 is appropriate.

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 'Removes all documents that match the filter from a MongoDB collection' clearly states the verb (removes), the resource (documents in a collection), and the scope (all that match filter). It distinguishes itself from sibling tools like drop-collection (removes the entire collection) and update-many (modifies documents).

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

Usage Guidelines4/5

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

The description provides a clear context for when to use the tool: when you need to delete multiple documents matching a filter from a MongoDB collection. However, it does not explicitly mention alternatives or when-not-to-use scenarios, such as using find+delete for smaller operations or drop-collection for removing the entire collection.

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

Install Server

Other Tools

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/Vijayakumar-DevOps/mongo-mcp-1.14.0'

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