Find Documents
find_documentsRetrieve documents from a MongoDB collection using filters, projections, and sort orders. Supports paging and optional database override for read-only queries.
Instructions
Find documents in a MongoDB collection with a filter, optional projection and sort
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| skip | No | Documents to skip, for paging | |
| sort | No | Sort order, e.g. {"createdAt": -1} | |
| limit | No | Maximum documents to return (1-100, default 20) | |
| filter | No | Query filter as MongoDB Extended JSON, e.g. {"status": "active", "_id": {"$oid": "..."}} | |
| database | No | Optional database to read from for this call only, without changing the active connection | |
| collection | Yes | Collection name | |
| projection | No | Fields to include or exclude, e.g. {"name": 1, "_id": 0} |