Skip to main content
Glama

MongoDB MCP Server

by jonfreeland

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

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jonfreeland/mongodb-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server