findOne
Fetches one matching document from a MongoDB collection using a required filter, returning the document or null when no authorized result exists.
Instructions
Consulta um documento autorizado ou retorna null.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"database": "<database>",
"collection": "<collection>",
"filter": "<filter>"
},
"name": "findOne"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | ||
| filter | Yes | Filtro obrigatório. Use campos, $eq, $ne, $gt, $gte, $lt, $lte, $in, $and e $or. | |
| database | Yes | ||
| collection | Yes | ||
| projection | No |