Query and explore MongoDB databases.
Execute a MongoDB aggregation pipeline on a collection. ONLY use this tool if you have already loaded the schema of the collection you need to query. Use the <get_collection_schema> tool to load the schema if not already known. Returns a list of JSON strings, where each string represents a result document from the aggregation (tools cannot return complex types). Aggregation pipelines allow for complex data processing including: * $match - filter documents * $group - group documents and perform calculations * $project - reshape documents * $sort - sort documents * $limit - limit results * $lookup - join with other collections * And many more stages
Count documents in a MongoDB collection matching the given filter.
Discover all the collections in the MongoDB database when the list of collections is not known. ALWAYS use this tool before any other tool that requires a collection name.
Discover all the databases in the MongoDB instance.
Find documents in a MongoDB collection. ONLY use this tool if you have already loaded the schema of the collection you need to query. Use the <get_collection_schema> tool to load the schema if not already known. Returns a list of JSON strings, where each string represents a document from the collection (tools cannot return complex types). When running queries, follow these rules which will help avoid errors: * Always specify projection to limit fields returned if you don't need all data. * Always sort your results by the most important fields first. If you aren't sure, sort by '_id'. * Use appropriate MongoDB query operators for complex filtering ($gte, $lte, $in, $regex, etc.). * Be mindful of case sensitivity when querying string fields. * Use indexes when possible (typically on _id and commonly queried fields).
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-03-06 | A+ | 96 | - | v1 |
Get the schema/structure of a MongoDB collection by sampling documents. Since MongoDB is schema-less, this tool samples a configurable number of documents to infer the schema structure and data types. This tool should ALWAYS be used before executing any query. All collections in the query must be discovered first using the <discover_collections> tool.