infer_schema
Samples a MongoDB collection to map every field path, its BSON types, and presence percentage, including nested objects and array elements, so you can understand document structure before querying or modeling.
Instructions
Infer the document structure from a random sample: every field path with its BSON types and how often it appears (present_pct). Nested objects use dots, array elements use "[]".
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": {
"collection": "<collection>"
},
"name": "infer_schema"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database | No | ||
| collection | Yes | ||
| connection | No | ||
| sample_size | No |