MongoDB MCP Server
by jonfreeland
get_schema
Infer schema from a collection by analyzing sample documents.
Best Practice: Use this before querying to understand collection structure.
Example: use_mcp_tool with server_name: "mongodb", tool_name: "get_schema", arguments: { "collection": "users", "sampleSize": 100 }
Input Schema
Name | Required | Description | Default |
---|---|---|---|
collection | Yes | Collection name | |
database | No | Database name (optional if default database is configured) | |
sampleSize | No | Number of documents to sample (default: 100) |