MongoDB MCP Server

get_indexes

Get information about indexes on a collection.

Returns details about:

  • Index names and fields
  • Index types (single field, compound, text, etc.)
  • Index sizes
  • Index options
  • Usage statistics

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" }