MongoDB MCP Server

get_collection_stats

Retrieve detailed collection statistics for MongoDB, including document count, size, storage metrics, index usage, and average document size. Optimize database performance and analyze data efficiently.

Instructions

Get detailed statistics about a collection.

Returns information about:

  • Document count and size
  • Storage metrics
  • Index sizes and usage
  • Average document size
  • Padding factor

Input Schema

NameRequiredDescriptionDefault
collectionYesCollection name
databaseNoDatabase name (optional if default database is configured)

Input Schema (JSON Schema)

{ "properties": { "collection": { "description": "Collection name", "type": "string" }, "database": { "description": "Database name (optional if default database is configured)", "type": "string" } }, "required": [ "collection" ], "type": "object" }

You must be authenticated.

Other Tools from MongoDB MCP Server

Related Tools

ID: cmywezu1sn