Skip to main content
Glama
Vijayakumar-DevOps

MongoDB MCP Server

Install in VS Code Install in Cursor

MongoDB MCP Server

A Model Context Protocol server for interacting with MongoDB Databases and MongoDB Atlas.

📚 Table of Contents

Related MCP server: MongoDB MCP Server for LLMs

Prerequisites

NOTE

Node 20.x support is deprecated and will be removed in a future release. Please upgrade to Node 22.13 or later. Seehttps://nodejs.org/en/blog/migrations/v20-to-v22 for migration details.

  • Node.js

    • At least v22.13.0. Check with node -v.

  • A MongoDB connection string or Atlas API credentials.

    • Service Accounts Atlas API credentials are required to use the Atlas tools. You can create a service account in MongoDB Atlas and use its credentials for authentication. See Atlas API Access for more details.

    • If you have a MongoDB connection string, you can use it directly to connect to your MongoDB instance.

Setup

Quick Start

🔒 Security Recommendation 1: When using Atlas API credentials, be sure to assign only the minimum required permissions to your service account. See Atlas API Permissions for details.

🔒 Security Recommendation 2: For enhanced security, we strongly recommend using environment variables to pass sensitive configuration such as connection strings and API credentials instead of command line arguments. Command line arguments can be visible in process lists and logged in various system locations, potentially exposing your secrets. Environment variables provide a more secure way to handle sensitive information.

Most MCP clients require a configuration file to be created or modified to add the MCP server.

Note: The configuration file syntax can be different across clients. Please refer to the following links for the latest expected syntax:

Default Safety Notice: All examples below include --readOnly by default to ensure safe, read-only access to your data. Remove --readOnly if you need to enable write operations.

Option 1: Connection String

You can pass your connection string via environment variables, make sure to use a valid username and password.

{
  "mcpServers": {
    "MongoDB": {
      "command": "npx",
      "args": ["-y", "mongodb-mcp-server@latest", "--readOnly"],
      "env": {
        "MDB_MCP_CONNECTION_STRING": "mongodb://localhost:27017/myDatabase"
      }
    }
  }
}

NOTE: The connection string can be configured to connect to any MongoDB cluster, whether it's a local instance or an Atlas cluster.

Option 2: Atlas API Credentials

Use your Atlas API Service Accounts credentials. Must follow all the steps in Atlas API Access section.

{
  "mcpServers": {
    "MongoDB": {
      "command": "npx",
      "args": ["-y", "mongodb-mcp-server@latest", "--readOnly"],
      "env": {
        "MDB_MCP_API_CLIENT_ID": "your-atlas-service-accounts-client-id",
        "MDB_MCP_API_CLIENT_SECRET": "your-atlas-service-accounts-client-secret"
      }
    }
  }
}

Option 3: Standalone Service using environment variables and command line arguments

You can source environment variables defined in a config file or explicitly set them like we do in the example below and run the server via npx.

# Set your credentials as environment variables first
export MDB_MCP_API_CLIENT_ID="your-atlas-service-accounts-client-id"
export MDB_MCP_API_CLIENT_SECRET="your-atlas-service-accounts-client-secret"

# Then start the server
npx -y mongodb-mcp-server@latest --readOnly

💡 Platform Note: The examples above use Unix/Linux/macOS syntax. For Windows users, see Environment Variables for platform-specific instructions.

  • For a complete list of configuration options see Configuration Options

  • To configure your Atlas Service Accounts credentials please refer to Atlas API Access

  • Connection String via environment variables in the MCP file example

  • Atlas API credentials via environment variables in the MCP file example

Option 4: Using Docker

You can run the MongoDB MCP Server in a Docker container, which provides isolation and doesn't require a local Node.js installation.

Run with Environment Variables

You may provide either a MongoDB connection string OR Atlas API credentials:

Option A: No configuration
docker run --rm -i \
  mongodb/mongodb-mcp-server:latest
Option B: With MongoDB connection string
# Set your credentials as environment variables first
export MDB_MCP_CONNECTION_STRING="mongodb+srv://username:password@cluster.mongodb.net/myDatabase"

# Then start the docker container
docker run --rm -i \
  -e MDB_MCP_CONNECTION_STRING \
  -e MDB_MCP_READ_ONLY="true" \
  mongodb/mongodb-mcp-server:latest

💡 Platform Note: The examples above use Unix/Linux/macOS syntax. For Windows users, see Environment Variables for platform-specific instructions.

Option C: With Atlas API credentials
# Set your credentials as environment variables first
export MDB_MCP_API_CLIENT_ID="your-atlas-service-accounts-client-id"
export MDB_MCP_API_CLIENT_SECRET="your-atlas-service-accounts-client-secret"

# Then start the docker container
docker run --rm -i \
  -e MDB_MCP_API_CLIENT_ID \
  -e MDB_MCP_API_CLIENT_SECRET \
  -e MDB_MCP_READ_ONLY="true" \
  mongodb/mongodb-mcp-server:latest

💡 Platform Note: The examples above use Unix/Linux/macOS syntax. For Windows users, see Environment Variables for platform-specific instructions.

Docker in MCP Configuration File

Without options:

{
  "mcpServers": {
    "MongoDB": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-e",
        "MDB_MCP_READ_ONLY=true",
        "-i",
        "mongodb/mongodb-mcp-server:latest"
      ]
    }
  }
}

With connection string:

{
  "mcpServers": {
    "MongoDB": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e",
        "MDB_MCP_CONNECTION_STRING",
        "-e",
        "MDB_MCP_READ_ONLY=true",
        "mongodb/mongodb-mcp-server:latest"
      ],
      "env": {
        "MDB_MCP_CONNECTION_STRING": "mongodb+srv://username:password@cluster.mongodb.net/myDatabase"
      }
    }
  }
}

With Atlas API credentials:

{
  "mcpServers": {
    "MongoDB": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e",
        "MDB_MCP_READ_ONLY=true",
        "-e",
        "MDB_MCP_API_CLIENT_ID",
        "-e",
        "MDB_MCP_API_CLIENT_SECRET",
        "mongodb/mongodb-mcp-server:latest"
      ],
      "env": {
        "MDB_MCP_API_CLIENT_ID": "your-atlas-service-accounts-client-id",
        "MDB_MCP_API_CLIENT_SECRET": "your-atlas-service-accounts-client-secret"
      }
    }
  }
}

Option 5: Running as an HTTP Server

⚠️ Security Notice: This server now supports Streamable HTTP transport for remote connections. HTTP transport is NOT recommended for production use without implementing proper authentication and security measures.

Suggested Security Measures Examples:

  • Implement authentication (e.g., API gateway, reverse proxy)

  • Use HTTPS/TLS encryption

  • Deploy behind a firewall or in private networks

  • Implement rate limiting

  • Never expose directly to the internet

For more details, see MCP Security Best Practices.

You can run the MongoDB MCP Server as an HTTP server instead of the default stdio transport. This is useful if you want to interact with the server over HTTP, for example from a web client or to expose the server on a specific port.

To start the server with HTTP transport, use the --transport http option:

npx -y mongodb-mcp-server@latest --transport http

By default, the server will listen on http://127.0.0.1:3000. You can customize the host and port using the --httpHost and --httpPort options:

npx -y mongodb-mcp-server@latest --transport http --httpHost=0.0.0.0 --httpPort=8080
  • --httpHost (default: 127.0.0.1): The host to bind the HTTP server.

  • --httpPort (default: 3000): The port number for the HTTP server.

Note: The default transport is stdio, which is suitable for integration with most MCP clients. Use http transport if you need to interact with the server over HTTP.

Option 6: Copilot CLI

You can use the Copilot CLI to interactively add the MCP server:

/mcp add

Alternatively, create or edit the configuration file ~/.copilot/mcp-config.json and add:

{
  "mcpServers": {
    "MongoDB": {
      "command": "npx",
      "args": ["-y", "mongodb-mcp-server@latest", "--readOnly"],
      "env": {
        "MDB_MCP_CONNECTION_STRING": "mongodb://localhost:27017/myDatabase"
      }
    }
  }
}

For more information, see the Copilot CLI documentation.

Option 7: OpenCode

Create or edit your OpenCode config file (~/.config/opencode/opencode.json or project-specific ./opencode.json):

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "MongoDB": {
      "type": "local",
      "command": ["npx", "-y", "mongodb-mcp-server@latest", "--readOnly"],
      "enabled": true,
      "environment": {
        "MDB_MCP_CONNECTION_STRING": "mongodb://localhost:27017/myDatabase"
      }
    }
  }
}

For more information about configuring OpenCode as an MCP client, including the expected syntax and options, see the OpenCode MCP servers documentation.

🛠️ Supported Tools

Tool List

MongoDB Database Tools

  • aggregate - Run an aggregation against a MongoDB collection

  • aggregate-db - Run an aggregation against a MongoDB database

  • collection-indexes - Describe the indexes for a collection

  • collection-schema - Describe the schema for a collection

  • collection-storage-size - Gets the size of the collection

  • connect - Connect to a MongoDB instance

  • count - Gets the number of documents in a MongoDB collection using db.collection.count() and query as an optional filter parameter

  • create-collection - Creates a new collection in a database. If the database doesn't exist, it will be created automatically.

  • create-index - Create an index for a collection

  • db-stats - Returns statistics that reflect the use state of a single database

  • delete-many - Removes all documents that match the filter from a MongoDB collection

  • drop-collection - Removes a collection or view from the database. The method also removes any indexes associated with the dropped collection.

  • drop-database - Removes the specified database, deleting the associated data files

  • drop-index - Drop an index for the provided database and collection.

  • explain - Returns statistics describing the execution of the winning plan chosen by the query optimizer for the evaluated method

  • export - Export a query or aggregation results in the specified EJSON format.

  • find - Run a find query against a MongoDB collection

  • insert-many - Insert an array of documents into a MongoDB collection. If the list of documents is above com.mongodb/maxRequestPayloadBytes, consider inserting them in batches.

  • list-collections - List all collections for a given database

  • list-databases - List all databases for a MongoDB connection

  • mongodb-logs - Returns the most recent logged mongod events

  • rename-collection - Renames a collection in a MongoDB database

  • switch-connection - Switch to a different MongoDB connection

  • update-many - Updates all documents that match the specified filter for a collection. If the list of documents is above com.mongodb/maxRequestPayloadBytes, consider updating them in batches.

MongoDB Atlas Tools

  • atlas-connect-cluster - Connect to MongoDB Atlas cluster

  • atlas-create-access-list - Allow Ip/CIDR ranges to access your MongoDB Atlas clusters.

  • atlas-create-cluster - Create a MongoDB Atlas cluster (M10–M80, replica set or single shard). Compute autoscaling is enabled by default: min instance size is set to the selected instance size, max is set two tiers above. Disk autoscaling is always enabled. The tool returns immediately, use the atlas-inspect-cluster tool to poll the cluster state for readiness (state: IDLE). Connection strings are unavailable until the cluster reaches IDLE state.

  • atlas-create-db-user - Create an MongoDB Atlas database user

  • atlas-create-free-cluster - Create a free MongoDB Atlas cluster

  • atlas-create-project - Create a MongoDB Atlas project

  • atlas-get-performance-advisor - Get MongoDB Atlas performance advisor recommendations and suggestions, which includes the operations: suggested indexes, drop index suggestions, schema suggestions, and a sample of the most recent (max 50) slow query logs

  • atlas-inspect-access-list - Inspect Ip/CIDR ranges with access to your MongoDB Atlas clusters.

  • atlas-inspect-cluster - Inspect metadata of a MongoDB Atlas cluster

  • atlas-list-alerts - List triggered alerts for a MongoDB Atlas project. These are alerts Atlas has raised, not the alert configurations that define them. Defaults to OPEN alerts; set status to TRACKING or CLOSED to see others.

  • atlas-list-clusters - List MongoDB Atlas clusters

  • atlas-list-db-users - List MongoDB Atlas database users

  • atlas-list-orgs - List MongoDB Atlas organizations

  • atlas-list-projects - List MongoDB Atlas projects

  • atlas-load-sample-dataset - Load a MongoDB sample dataset into an Atlas cluster, or check the status of a previously-initiated load. To start a new load, provide clusterName — the load runs asynchronously and the response includes a jobId and initial state. To check progress, call this tool again with jobId (sample dataset loads typically take 1–5 minutes). State can be WORKING, COMPLETED, or FAILED.

  • atlas-pause-resume-cluster - Pause or resume a dedicated (M10+) MongoDB Atlas cluster.

  • atlas-streams-build - Create Atlas Stream Processing resources. Use this tool for 'set up a Kafka pipeline', 'create a workspace', 'add a connection', or 'deploy a processor'. Use resource='workspace' to create a new workspace (specify cloud provider, region, and tier). Use resource='connection' to add a data source or sink to an existing workspace. Use resource='processor' to deploy a stream processor with a pipeline. Use resource='privatelink' to set up private networking. Typical workflow: create workspace → add connections → deploy processor.

  • atlas-streams-discover - Discover and inspect Atlas Stream Processing resources. Also use for 'why is my processor failing', 'what workspaces do I have', 'show processor stats', or 'check processor health'. Use 'list-workspaces' to see all workspaces in a project. Use inspect actions for details on a specific resource. Use 'diagnose-processor' for a combined health report including state, stats, connection health, and recent errors. Use 'get-networking' for PrivateLink and account details.

  • atlas-streams-manage - Manage Atlas Stream Processing resources: start/stop processors, modify pipelines, update configurations. Also use for 'change the pipeline', 'scale up my processor', or 'update my workspace tier'. Common workflow: action='stop-processor' → action='modify-processor' → action='start-processor'. Use atlas-streams-discover with action 'inspect-processor' to check state before managing.

  • atlas-streams-teardown - Delete Atlas Stream Processing resources. Also use for 'remove my workspace', 'disconnect a source', 'delete all processors', or 'clean up my streams environment'. Performs basic safety checks before deletion: summarizes counts of processors and connections, highlights connections referenced by processors where possible, and surfaces API errors if processors are still running when deletion is attempted. Use atlas-streams-discover to review resources before deleting.

  • atlas-upgrade-cluster - Upgrade a MongoDB Atlas cluster tier. Upgrades Free (M0) clusters to Flex or M10 Dedicated, or Flex clusters to M10 Dedicated. The upgrade path is determined automatically from the current tier unless overridden with targetTier. Note to LLM: If provider and region are not already known, ask for both together in a single question before calling this tool. Common region mappings by provider (default recommendation: AWS US_EAST_1): AWS: "East Coast"/"Virginia"/"US East" → US_EAST_1, "Ohio" → US_EAST_2, "California"/"West Coast" → US_WEST_2, "Southeast Asia"/"APAC"/"Singapore" → AP_SOUTHEAST_1, "Europe"/"EU"/"Ireland" → EU_WEST_1. GCP: "Central US" → CENTRAL_US, "Western US" → WESTERN_US, "Southeast Asia"/"APAC" → SOUTHEASTERN_ASIA_PACIFIC, "Europe"/"EU" → WESTERN_EUROPE. AZURE: "East US" → US_EAST_2, "West US" → US_WEST_2, "Europe"/"EU" → EUROPE_NORTH.

NOTE: atlas tools are only available when you set credentials on configuration section.

MongoDB Atlas Local Tools

  • atlas-local-connect-deployment - Connect to a MongoDB Atlas Local deployment

  • atlas-local-create-deployment - Create a MongoDB Atlas local deployment. Default image is preview. When the user does not specify an image tag, inform them that preview is used by default and provide this link for more information: https://hub.docker.com/r/mongodb/mongodb-atlas-local

  • atlas-local-delete-deployment - Delete a MongoDB Atlas local deployment

  • atlas-local-list-deployments - List MongoDB Atlas local deployments

MongoDB Assistant Tools

  • list-knowledge-sources - List available data sources in the MongoDB Assistant knowledge base. Use this to explore available data sources or to find search filter parameters to use in search-knowledge.

  • search-knowledge - Search for information in the MongoDB Assistant knowledge base. This includes official documentation, curated expert guidance, and other resources provided by MongoDB. Supports filtering by data source and version.

📄 Supported Resources

  • config - Server configuration, supplied by the user either as environment variables or as startup arguments with sensitive parameters redacted. The resource can be accessed under URI config://config.

  • debug - Debugging information for MongoDB connectivity issues. Tracks the last connectivity attempt and error information. The resource can be accessed under URI debug://mongodb.

  • exported-data - A resource template to access the data exported using the export tool. The template can be accessed under URI exported-data://{exportName} where exportName is the unique name for an export generated by the export tool.

Configuration

🔒 Security Best Practice: We strongly recommend using environment variables for sensitive configuration such as API credentials (MDB_MCP_API_CLIENT_ID, MDB_MCP_API_CLIENT_SECRET) and connection strings (MDB_MCP_CONNECTION_STRING) instead of command-line arguments. Environment variables are not visible in process lists and provide better security for your sensitive data.

The MongoDB MCP Server can be configured using multiple methods, with the following precedence (highest to lowest):

  1. Command-line arguments

  2. Environment variables

  3. Configuration File

Configuration Options

Environment Variable / CLI Option

Default

Description

MDB_MCP_ALLOW_REQUEST_OVERRIDES / --allowRequestOverrides

false

When set to true, allows configuration values to be overridden via request headers and query parameters.

MDB_MCP_API_CLIENT_ID / --apiClientId

<not set>

Atlas API client ID for authentication. Required for running Atlas tools.

MDB_MCP_API_CLIENT_SECRET / --apiClientSecret

<not set>

Atlas API client secret for authentication. Required for running Atlas tools.

MDB_MCP_ASSISTANT_BASE_URL / --assistantBaseUrl

"https://knowledge.mongodb.com/api/v1/"

Base URL for the MongoDB Assistant API.

MDB_MCP_ATLAS_TEMPORARY_DATABASE_USER_LIFETIME_MS / --atlasTemporaryDatabaseUserLifetimeMs

14400000

Time in milliseconds that temporary database users created when connecting to MongoDB Atlas clusters will remain active before being automatically deleted.

MDB_MCP_CONFIRMATION_REQUIRED_TOOLS / --confirmationRequiredTools

"atlas-create-access-list,atlas-create-db-user,drop-database,drop-collection,delete-many,drop-index,atlas-streams-manage,atlas-streams-teardown"

Comma separated values of tool names that require user confirmation before execution. Requires the client to support elicitation.

MDB_MCP_CONNECTION_STRING / --connectionString

<not set>

MongoDB connection string for direct database connections. Optional, if not set, you'll need to call the connect tool before interacting with MongoDB data.

MDB_MCP_DISABLE_SERVER_SIDE_JS / --disableServerSideJs

true

When set to true, disallows the use of server-side JavaScript operators (such as $where, $function, and $accumulator) in query filters and aggregation pipelines.

MDB_MCP_DISABLED_TOOLS / --disabledTools

""

Comma separated values of tool names, operation types, and/or categories of tools that will be disabled.

MDB_MCP_DRY_RUN / --dryRun

false

When true, runs the server in dry mode: dumps configuration and enabled tools, then exits without starting the server.

MDB_MCP_EXPORT_CLEANUP_INTERVAL_MS / --exportCleanupIntervalMs

120000

Time in milliseconds between export cleanup cycles that remove expired export files.

MDB_MCP_EXPORT_TIMEOUT_MS / --exportTimeoutMs

300000

Time in milliseconds after which an export is considered expired and eligible for cleanup.

MDB_MCP_EXPORTS_PATH / --exportsPath

see below*

Folder to store exported data files.

MDB_MCP_EXTERNALLY_MANAGED_SESSIONS / --externallyManagedSessions

false

When true, the HTTP transport allows requests with a session ID supplied externally through the 'mcp-session-id' header. When an external ID is supplied, the initialization request is optional.

MDB_MCP_HEALTH_CHECK_HOST / --healthCheckHost

<not set>

Deprecated. Use monitoringServerHost instead. Host address to bind the healthCheck HTTP server to (only used when transport is 'http'). If provided, healthCheckPort must also be set.

MDB_MCP_HEALTH_CHECK_PORT / --healthCheckPort

<not set>

Deprecated. Use monitoringServerPort instead. Port number for the healthCheck HTTP server (only used when transport is 'http'). If provided, healthCheckHost must also be set.

MDB_MCP_HTTP_BODY_LIMIT / --httpBodyLimit

102400

Maximum size of the HTTP request body in bytes (only used when transport is 'http'). This value is passed as the optional limit parameter to the Express.js json() middleware.

MDB_MCP_HTTP_HEADERS / --httpHeaders

"{}"

Header that the HTTP server will validate when making requests (only used when transport is 'http').

MDB_MCP_HTTP_HOST / --httpHost

"127.0.0.1"

Host address to bind the HTTP server to (only used when transport is 'http').

MDB_MCP_HTTP_PORT / --httpPort

3000

Port number for the HTTP server (only used when transport is 'http'). Use 0 for a random port.

MDB_MCP_HTTP_RESPONSE_TYPE / --httpResponseType

"sse"

The HTTP response type for tool responses: 'sse' for Server-Sent Events, 'json' for standard JSON responses.

MDB_MCP_IDLE_TIMEOUT_MS / --idleTimeoutMs

600000

Idle timeout for a client to disconnect (only applies to http transport).

MDB_MCP_INDEX_CHECK / --indexCheck

false

When set to true, enforces that query operations must use an index, rejecting queries that perform a collection scan.

MDB_MCP_LOG_PATH / --logPath

see below*

Folder to store logs.

MDB_MCP_LOGGERS / --loggers

"disk,mcp" see below*

Comma separated values of logger types.

MDB_MCP_MAX_BYTES_PER_QUERY / --maxBytesPerQuery

16777216

The maximum size in bytes for results from a find or aggregate tool call. This serves as an upper bound for the responseBytesLimit parameter in those tools.

MDB_MCP_MAX_DOCUMENTS_PER_QUERY / --maxDocumentsPerQuery

100

The maximum number of documents that can be returned by a find or aggregate tool call. For the find tool, the effective limit will be the smaller of this value and the tool's limit parameter.

MDB_MCP_MAX_SESSIONS / --maxSessions

1000

Maximum number of concurrent sessions the HTTP transport will hold in memory (only used when transport is 'http'). Each session holds a full server instance, transport, and timers, so choose a value based on your deployment's available memory; the default is a conservative safety net rather than a recommended production value.

MDB_MCP_MAX_TIME_M_S / --maxTimeMS

<not set>

The maximum time in milliseconds that operations are allowed to run on the MongoDB server. When set, this value is passed as the maxTimeMS option to read operations such as find, aggregate, and count.

MDB_MCP_MCP_CLIENT_LOG_LEVEL / --mcpClientLogLevel

"debug"

Minimum severity level for log messages forwarded to the MCP client.

MDB_MCP_MONITORING_SERVER_FEATURES / --monitoringServerFeatures

"health-check"

Features to expose on the monitoring server (only used when transport is 'http' and monitoringServerHost/monitoringServerPort are set).

MDB_MCP_MONITORING_SERVER_HOST / --monitoringServerHost

<not set>

Host address to bind the monitoring HTTP server to (only used when transport is 'http'). If provided, monitoringServerPort must also be set.

MDB_MCP_MONITORING_SERVER_PORT / --monitoringServerPort

<not set>

Port number for the monitoring HTTP server (only used when transport is 'http'). If provided, monitoringServerHost must also be set.

MDB_MCP_NOTIFICATION_TIMEOUT_MS / --notificationTimeoutMs

540000

Notification timeout for a client to be aware of disconnect (only applies to http transport).

MDB_MCP_PREVIEW_FEATURES / --previewFeatures

""

Comma separated values of preview features that are enabled.

MDB_MCP_READ_ONLY / --readOnly

false

When set to true, only allows read, connect, and metadata operation types, disabling create/update/delete operations.

MDB_MCP_TELEMETRY / --telemetry

"enabled"

When set to disabled, disables telemetry collection.

MDB_MCP_TRANSPORT / --transport

"stdio"

Either 'stdio' or 'http'.

MDB_MCP_VOYAGE_API_KEY / --voyageApiKey

""

API key for Voyage AI embeddings service (required for creating Atlas Local deployments with auto-embed vector search capabilities).

Logger Options

The loggers configuration option controls where logs are sent. You can specify one or more logger types as a comma-separated list. The available options are:

  • mcp: Sends logs to the MCP client (if supported by the client/transport).

  • disk: Writes logs to disk files. Log files are stored in the log path (see logPath above).

  • stderr: Outputs logs to standard error (stderr), useful for debugging or when running in containers.

Default: disk,mcp (logs are written to disk and sent to the MCP client).

You can combine multiple loggers, e.g. --loggers disk stderr or export MDB_MCP_LOGGERS="mcp,stderr".

Example: Set logger via environment variable
export MDB_MCP_LOGGERS="disk,stderr"

💡 Platform Note: For Windows users, see Environment Variables for platform-specific instructions.

Example: Set logger via command-line argument
npx -y mongodb-mcp-server@latest --loggers mcp stderr
Log File Location

When using the disk logger, log files are stored in:

  • Windows: %LOCALAPPDATA%\mongodb\mongodb-mcp\.app-logs

  • macOS/Linux: ~/.mongodb/mongodb-mcp/.app-logs

You can override the log directory with the logPath option.

🔒 Security Guideline: The user account running the MCP server must have both read and write permissions to the logPath directory. Ensure this directory is properly secured with appropriate file system permissions to prevent unauthorized access to log files.

Disabled Tools

You can disable specific tools or categories of tools by using the disabledTools option. This option accepts an array of strings, where each string can be a tool name, operation type, or category.

The way the array is constructed depends on the type of configuration method you use:

  • For environment variable configuration, use a comma-separated string: export MDB_MCP_DISABLED_TOOLS="create,update,delete,atlas,collectionSchema".

  • For command-line argument configuration, use a space-separated string: --disabledTools create update delete atlas collectionSchema.

Categories of tools:

  • atlas - MongoDB Atlas tools, such as list clusters, create cluster, etc.

  • mongodb - MongoDB database tools, such as find, aggregate, etc.

Operation types:

  • create - Tools that create resources, such as create cluster, insert document, etc.

  • update - Tools that update resources, such as update document, rename collection, etc.

  • delete - Tools that delete resources, such as delete document, drop collection, etc.

  • read - Tools that read resources, such as find, aggregate, list clusters, etc.

  • metadata - Tools that read metadata, such as list databases/collections/indexes, infer collection schema, etc.

  • connect - Tools that allow you to connect or switch the connection to a MongoDB instance. If this is disabled, you will need to provide a connection string through the config when starting the server.

Require Confirmation

If your client supports elicitation, you can set the MongoDB MCP server to request user confirmation before executing certain tools.

When a tool is marked as requiring confirmation, the server will send an elicitation request to the client. The client with elicitation support will then prompt the user for confirmation and send the response back to the server. If the client does not support elicitation, the tool will execute without confirmation.

You can set the confirmationRequiredTools configuration option to specify the names of tools which require confirmation. By default, the following tools have this setting enabled: drop-database, drop-collection, delete-many, atlas-create-db-user, atlas-create-access-list.

Read-Only Mode

The readOnly configuration option allows you to restrict the MCP server to only use tools with "read", "connect", and "metadata" operation types. When enabled, all tools that have "create", "update" or "delete" operation types will not be registered with the server.

This is useful for scenarios where you want to provide access to MongoDB data for analysis without allowing any modifications to the data or infrastructure.

You can enable read-only mode using:

  • Environment variable: export MDB_MCP_READ_ONLY=true

  • Command-line argument: --readOnly

💡 Platform Note: For Windows users, see Environment Variables for platform-specific instructions.

When read-only mode is active, you'll see a message in the server logs indicating which tools were prevented from registering due to this restriction.

Index Check Mode

The indexCheck configuration option allows you to enforce that query operations must use an index. When enabled, queries that perform a collection scan will be rejected to ensure better performance.

This is useful for scenarios where you want to ensure that database queries are optimized.

You can enable index check mode using:

  • Environment variable: export MDB_MCP_INDEX_CHECK=true

  • Command-line argument: --indexCheck

💡 Platform Note: For Windows users, see Environment Variables for platform-specific instructions.

When index check mode is active, you'll see an error message if a query is rejected due to not using an index.

Exports

The data exported by the export tool is temporarily stored in the configured exportsPath on the machine running the MCP server until cleaned up by the export cleanup process. If the exportsPath configuration is not provided, the following defaults are used:

  • Windows: %LOCALAPPDATA%\mongodb\mongodb-mcp\exports

  • macOS/Linux: ~/.mongodb/mongodb-mcp/exports

The exportTimeoutMs configuration controls the time after which the exported data is considered expired and eligible for cleanup. By default, exports expire after 5 minutes (300000ms).

The exportCleanupIntervalMs configuration controls how frequently the cleanup process runs to remove expired export files. By default, cleanup runs every 2 minutes (120000ms).

🔒 Security Guideline: The user account running the MCP server must have both read and write permissions to the exportsPath directory. Ensure this directory is properly secured with appropriate file system permissions to prevent unauthorized access to exported data files, which may contain sensitive MongoDB data. Consider the sensitivity of your data when choosing the export location and apply restrictive permissions accordingly.

Telemetry

The telemetry configuration option allows you to disable telemetry collection. When enabled, the MCP server will collect usage data and send it to MongoDB.

You can disable telemetry using:

  • Environment variable: export MDB_MCP_TELEMETRY=disabled

  • Command-line argument: --telemetry disabled

  • DO_NOT_TRACK environment variable: export DO_NOT_TRACK=1

💡 Platform Note: For Windows users, see Environment Variables for platform-specific instructions.

Opting into Preview Features

The MongoDB MCP Server may offer functionality that is still in development and may change in future releases. These features are considered "preview features" and are not enabled by default. Generally, these features are well tested, but may not offer the complete functionality we intend to provide in the final release or we'd like to gather feedback before making them generally available. To enable one or more preview features, use the previewFeatures configuration option.

  • For environment variable configuration, use a comma-separated string: export MDB_MCP_PREVIEW_FEATURES="feature1,feature2".

  • For command-line argument configuration, use a space-separated string: --previewFeatures feature1 feature2.

List of available preview features:

  • mcpUI - Enables an optional web-based UI for interacting with the MCP server.

Monitoring Server (Health Check & Metrics)

When running with --transport http, you can expose a separate monitoring HTTP server for health checks and metrics. This server is only started when both monitoringServerHost and monitoringServerPort are set, and it listens on its own host/port (independent from the main httpHost/httpPort).

The features exposed are controlled by monitoringServerFeatures (default: health-check). Available features and their endpoints:

Feature

Endpoint

Description

health-check

/health

Returns 200 OK with a JSON body describing the server status. Useful for liveness probes.

metrics

/metrics

Returns server metrics in Prometheus text format.

The /health response is sent with Cache-Control: no-store and has the following shape (status is always "ok" while the process is alive):

{
  "status": "ok",
  "version": "1.13.0",
  "uptimeSeconds": 42,
  "timestamp": "2026-06-20T12:00:00.000Z"
}

Example: start the server with the monitoring server enabled and call the health-check endpoint:

npx -y mongodb-mcp-server@latest --transport http --httpHost 0.0.0.0 --httpPort 3000 --monitoringServerHost 0.0.0.0 --monitoringServerPort 8080 &
curl http://0.0.0.0:8080/health
# => {"status":"ok","version":"1.13.0","uptimeSeconds":42,"timestamp":"2026-06-20T12:00:00.000Z"}

To expose both endpoints, pass the features explicitly:

npx -y mongodb-mcp-server@latest --transport http --monitoringServerHost 0.0.0.0 --monitoringServerPort 8080 --monitoringServerFeatures health-check,metrics

💡 Note: healthCheckHost / healthCheckPort are deprecated aliases for monitoringServerHost / monitoringServerPort and continue to serve the same /health endpoint.

Atlas API Access

To use the Atlas API tools, you'll need to create a service account in MongoDB Atlas:

ℹ️ Note: For a detailed breakdown of the minimum required permissions for each Atlas operation, see the Atlas API Permissions section below.

  1. Create a Service Account:

    • Log in to MongoDB Atlas at cloud.mongodb.com

    • Navigate to Access Manager > Organization Access

    • Click Add New > Applications > Service Accounts

    • Enter name, description and expiration for your service account (e.g., "MCP, MCP Server Access, 7 days")

    • Assign only the minimum permissions needed for your use case.

    • Click "Create"

To learn more about Service Accounts, check the MongoDB Atlas documentation.

  1. Save Client Credentials:

    • After creation, you'll be shown the Client ID and Client Secret

    • Important: Copy and save the Client Secret immediately as it won't be displayed again

  2. Add Access List Entry:

    • Add your IP address to the API access list

  3. Configure the MCP Server:

    • Use one of the configuration methods below to set your apiClientId and apiClientSecret

Atlas API Permissions

Security Warning: Granting the Organization Owner role is rarely necessary and can be a security risk. Assign only the minimum permissions needed for your use case.

Quick Reference: Required roles per operation

What you want to do

Safest Role to Assign (where)

List orgs/projects

Org Member or Org Read Only (Org)

Create new projects

Org Project Creator (Org)

View clusters/databases in a project

Project Read Only (Project)

Create/manage clusters in a project

Project Cluster Manager (Project)

Manage project access lists

Project IP Access List Admin (Project)

Manage database users

Project Database Access Admin (Project)

Manage stream processing resources

Project Stream Processing Owner (Project)

  • Prefer project-level roles for most operations. Assign only to the specific projects you need to manage or view.

  • Avoid Organization Owner unless you require full administrative control over all projects and settings in the organization.

For a full list of roles and their privileges, see the Atlas User Roles documentation.

Configuration Methods

Configuration File

Store configuration in a JSON file and load it using the MDB_MCP_CONFIG environment variable.

🔒 Security Best Practice: Prefer using the MDB_MCP_CONFIG environment variable for sensitive fields over the configuration file or --config CLI argument. Command-line arguments are visible in process listings.

🔒 File Security: Ensure your configuration file has proper ownership and permissions, limited to the user running the MongoDB MCP server:

Linux/macOS:

chmod 600 /path/to/config.json
chown your-username /path/to/config.json

Windows: Right-click the file → Properties → Security → Restrict access to your user account only.

Create a JSON file with your configuration (all keys use camelCase):

{
  "connectionString": "mongodb://localhost:27017",
  "readOnly": true,
  "loggers": ["stderr", "mcp"],
  "apiClientId": "your-atlas-service-accounts-client-id",
  "apiClientSecret": "your-atlas-service-accounts-client-secret",
  "maxDocumentsPerQuery": 100
}

Linux/macOS (bash/zsh):

export MDB_MCP_CONFIG="/path/to/config.json"
npx -y mongodb-mcp-server@latest

Windows Command Prompt (cmd):

set "MDB_MCP_CONFIG=C:\path\to\config.json"
npx -y mongodb-mcp-server@latest

Windows PowerShell:

$env:MDB_MCP_CONFIG="C:\path\to\config.json"
npx -y mongodb-mcp-server@latest

Environment Variables

Set environment variables with the prefix MDB_MCP_ followed by the option name in uppercase with underscores:

Linux/macOS (bash/zsh):

# Set Atlas API credentials (via Service Accounts)
export MDB_MCP_API_CLIENT_ID="your-atlas-service-accounts-client-id"
export MDB_MCP_API_CLIENT_SECRET="your-atlas-service-accounts-client-secret"

# Set a custom MongoDB connection string
export MDB_MCP_CONNECTION_STRING="mongodb+srv://username:password@cluster.mongodb.net/myDatabase"

# Set log path
export MDB_MCP_LOG_PATH="/path/to/logs"

Windows Command Prompt (cmd):

set "MDB_MCP_API_CLIENT_ID=your-atlas-service-accounts-client-id"
set "MDB_MCP_API_CLIENT_SECRET=your-atlas-service-accounts-client-secret"

set "MDB_MCP_CONNECTION_STRING=mongodb+srv://username:password@cluster.mongodb.net/myDatabase"

set "MDB_MCP_LOG_PATH=C:\path\to\logs"

Windows PowerShell:

# Set Atlas API credentials (via Service Accounts)
$env:MDB_MCP_API_CLIENT_ID="your-atlas-service-accounts-client-id"
$env:MDB_MCP_API_CLIENT_SECRET="your-atlas-service-accounts-client-secret"

# Set a custom MongoDB connection string
$env:MDB_MCP_CONNECTION_STRING="mongodb+srv://username:password@cluster.mongodb.net/myDatabase"

# Set log path
$env:MDB_MCP_LOG_PATH="C:\path\to\logs"

MCP configuration file examples

Connection String with environment variables
{
  "mcpServers": {
    "MongoDB": {
      "command": "npx",
      "args": ["-y", "mongodb-mcp-server"],
      "env": {
        "MDB_MCP_CONNECTION_STRING": "mongodb+srv://username:password@cluster.mongodb.net/myDatabase"
      }
    }
  }
}
Atlas API credentials with environment variables
{
  "mcpServers": {
    "MongoDB": {
      "command": "npx",
      "args": ["-y", "mongodb-mcp-server"],
      "env": {
        "MDB_MCP_API_CLIENT_ID": "your-atlas-service-accounts-client-id",
        "MDB_MCP_API_CLIENT_SECRET": "your-atlas-service-accounts-client-secret"
      }
    }
  }
}

Command-Line Arguments

Pass configuration options as command-line arguments when starting the server:

🔒 Security Note: For sensitive configuration like API credentials and connection strings, use environment variables instead of command-line arguments.

# Set sensitive data as environment variable
export MDB_MCP_API_CLIENT_ID="your-atlas-service-accounts-client-id"
export MDB_MCP_API_CLIENT_SECRET="your-atlas-service-accounts-client-secret"
export MDB_MCP_CONNECTION_STRING="mongodb+srv://username:password@cluster.mongodb.net/myDatabase"

# Start the server with command line arguments
npx -y mongodb-mcp-server@latest --logPath=/path/to/logs --readOnly --indexCheck

💡 Platform Note: The examples above use Unix/Linux/macOS syntax. For Windows users, see Environment Variables for platform-specific instructions.

MCP configuration file examples

Connection String with command-line arguments

🔒 Security Note: We do not recommend passing connection string as command line argument. Connection string might contain credentials which can be visible in process lists and logged in various system locations, potentially exposing your credentials. Instead configure connection string through environment variables

{
  "mcpServers": {
    "MongoDB": {
      "command": "npx",
      "args": [
        "-y",
        "mongodb-mcp-server",
        "mongodb+srv://username:password@cluster.mongodb.net/myDatabase",
        "--readOnly"
      ]
    }
  }
}
Atlas API credentials with command-line arguments

🔒 Security Note: We do not recommend passing Atlas API credentials as command line argument. The provided credentials can be visible in process lists and logged in various system locations, potentially exposing your credentials. Instead configure Atlas API credentials through environment variables

{
  "mcpServers": {
    "MongoDB": {
      "command": "npx",
      "args": [
        "-y",
        "mongodb-mcp-server",
        "--apiClientId",
        "your-atlas-service-accounts-client-id",
        "--apiClientSecret",
        "your-atlas-service-accounts-client-secret",
        "--readOnly"
      ]
    }
  }
}

Proxy Support

The MCP Server detects standard proxy environment variables and uses them for supported outbound connections, including the Atlas Administration API, MongoDB cluster connections, OIDC identity providers, and the MongoDB Assistant. The behaviour matches mongosh (both rely on @mongodb-js/devtools-proxy-support), so any proxy configuration that works with mongosh also works here.

Environment variables

Set the relevant variable before starting the server. The conventional *_PROXY variables are honored:

Variable

Purpose

HTTPS_PROXY

Proxy used for HTTPS requests (Atlas API, OIDC, Assistant)

HTTP_PROXY

Proxy used for plain HTTP requests

ALL_PROXY

Fallback proxy used for all protocols

NO_PROXY

Comma-separated list of hosts/domains that bypass the proxy

# Route outbound traffic through a corporate proxy, except internal hosts
export HTTPS_PROXY="http://proxy.example.com:8080"
export NO_PROXY="localhost,127.0.0.1,*.internal.example.com"

Proxy in the connection string

For the MongoDB cluster connection specifically, you can configure a SOCKS5 proxy directly in the connection string instead of using environment variables:

mongodb+srv://<host>/?proxyHost=127.0.0.1&proxyPort=1080&proxyUsername=user&proxyPassword=pass

Supported parameters: proxyHost, proxyPort, proxyUsername, proxyPassword.

Certificate authorities

For the HTTP(S) requests handled by @mongodb-js/devtools-proxy-support (the Atlas API, OIDC, and the MongoDB Assistant), the operating system's certificate store is trusted in addition to the bundled CAs — the same way mongosh does — so corporate root certificates installed at the OS level are picked up automatically.

🚀Deploy on Public Clouds

You can deploy the MongoDB MCP Server to your preferred cloud provider using the deployment assets under deploy/. Each guide explains the prerequisites, configuration, and automation scripts that streamline the rollout.

Azure

For detailed Azure instructions, see deploy/azure/README.md.

🤝Contributing

Interested in contributing? Great! Please check our Contributing Guide for guidelines on code contributions, standards, adding new tools, and troubleshooting information.

Available Tools

25 tools
aggregateB
Read-only

Run an aggregation against a MongoDB collection

ParametersJSON Schema
NameRequiredDescriptionDefault
databaseYesDatabase name
pipelineYes
collectionYesCollection name
responseBytesLimitNoThe maximum number of bytes to return in the response. This value is capped by the server's configured maxBytesPerQuery and cannot be exceeded. Note to LLM: If the entire aggregation result is required, use the "export" tool instead of increasing this limit.

Output Schema

ParametersJSON Schema
NameRequiredDescription
countYesThe total number of documents returned by the aggregation pipeline
documentsYesThe documents returned by the aggregation pipeline
appliedLimitsYesThe limits applied to the aggregation pipeline

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description adds no behavioral context beyond the annotations; it repeats the obvious aggregation action. It does not mention performance implications, result limits, or the fact that aggregation can be complex/long-running. Annotations already declare read-only and non-destructive, so the agent's safety understanding is covered.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no redundant words. It front-loads the core action and resource.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (4 params, intricate pipeline schema with $vectorSearch variants), the one-sentence description is insufficient. It omits any context about the pipeline structure, response size limits, or relation to similar tools, although the schema itself covers some of this.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description does not explain any parameter, including the critical 'pipeline' parameter which lacks a schema-level description. Schema coverage is 75% (database, collection, responseBytesLimit described), but the pipeline's meaning is left implicit. No additional semantic value is added by the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool runs an aggregation on a MongoDB collection, using a specific verb and resource. It distinguishes from siblings by mentioning 'collection' (vs aggregate-db) and 'aggregation' (vs find/count).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to choose this tool over alternatives like find, count, or aggregate-db. The only alternative mention ('export') appears in the schema's responseBytesLimit description, not the tool description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

aggregate-dbC
Read-only

Run an aggregation against a MongoDB database

ParametersJSON Schema
NameRequiredDescriptionDefault
databaseYesDatabase name
pipelineYesAn array of aggregation stages to execute. The first stage must be a database-level aggregation stage (one of `$changeStream`, `$currentOp`, `$documents`, `$listLocalSessions`, `$queryStats`). https://www.mongodb.com/docs/manual/reference/mql/aggregation-stages/#db.aggregate---stages
responseBytesLimitNoThe maximum number of bytes to return in the response. This value is capped by the server's configured maxBytesPerQuery and cannot be exceeded.

Output Schema

ParametersJSON Schema
NameRequiredDescription
documentsYesThe documents returned by the aggregation pipeline
appliedLimitsYesThe limits applied to the aggregation pipeline
aggResultsCountNoThe total number of documents returned by the aggregation pipeline

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The annotations already provide readOnlyHint=true and destructiveHint=false, and the description adds no additional behavioral context. It does not mention that only database-level stages are allowed, the response size cap, or any potential side effects. Despite the annotations, the description is essentially a restatement of the tool name with no value beyond the structured metadata.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no wasted words. It is concise, though it omits important details; however, that omission is better captured in other dimensions.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is too sparse for a tool with an aggregation pipeline. It does not mention that this is database-level aggregation (which would differentiate it from 'aggregate'), nor does it highlight constraints like the allowed stages or response limits. The schema covers some of this, but the description fails to provide the necessary context for correct tool selection.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, and the schema itself thoroughly documents each parameter, including a link for valid stages. The description adds no extra semantic meaning, so the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Run an aggregation') and the resource ('a MongoDB database'), which is specific enough. However, it does not explicitly distinguish itself from the sibling tool 'aggregate', so it gets a 4 rather than a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The sibling tool 'aggregate' likely handles collection-level aggregations, but this is not mentioned. The description offers no exclusions or explicit usage scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

collection-indexesA
Read-only

Describe the indexes for a collection

ParametersJSON Schema
NameRequiredDescriptionDefault
databaseYesDatabase name
collectionYesCollection name

Output Schema

ParametersJSON Schema
NameRequiredDescription
searchIndexesYes
classicIndexesYes
searchIndexesCountYes
classicIndexesCountYes

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare readOnlyHint=true and destructiveHint=false, and the description aligns with these by using 'describe'. However, no additional behavioral context is offered beyond the annotations, such as prerequisites or what the output contains.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no filler or redundant information. It is appropriately sized for a simple tool and front-loaded with the action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read-only tool with a fully documented input schema and an output schema, the description is sufficient. It states the action and resource clearly; annotations cover safety. Minor gap: no mention of needing an existing collection, but this is not critical.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema provides full descriptions for both parameters (database name, collection name) with 100% coverage, so the description does not need to add parameter meaning. It adds no extra detail beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description uses a specific verb ('describe') and resource ('indexes for a collection'), clearly distinguishing it from sibling tools like create-index and drop-index. The purpose is unambiguous and directly states what the tool does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit when-to-use or alternative guidance is provided. The read-only nature is implied by 'describe' but not stated, and no exclusions or alternative recommendations are given. Usage is inferred from the tool's name and relationship to siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

collection-schemaB
Read-only

Describe the schema for a collection

ParametersJSON Schema
NameRequiredDescriptionDefault
databaseYesDatabase name
collectionYesCollection name
sampleSizeNoNumber of documents to sample for schema inference
responseBytesLimitNoThe maximum number of bytes to return in the response. This value is capped by the server's configured maxBytesPerQuery and cannot be exceeded.

Output Schema

ParametersJSON Schema
NameRequiredDescription
schemaYes
fieldsCountYes

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and destructiveHint=false, and the description adds no behavioral context beyond that. It does not disclose that schema inference samples documents (via sampleSize) or that response size is limited by responseBytesLimit, nor any other operational traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, compact sentence that is front-loaded with the core action and target. Every word is necessary, with no redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has an output schema and safe annotations, but the description is minimal. It explains the basic purpose but omits context such as how the schema is inferred (sampling) and the presence of configurable limits, leaving a competent but bare-minimum description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema provides 100% parameter descriptions, so the baseline is 3. The tool description itself adds no parameter-level detail beyond what the schema already documents, so the schema carries the full burden.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Describe') and a clear resource ('schema for a collection'), making the tool's purpose immediately obvious. It distinguishes itself from sibling tools like 'collection-indexes' or 'aggregate' by focusing on schema structure.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus alternatives. It does not mention prerequisites, typical use cases, or when a different tool (e.g., 'collection-indexes') would be more appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

collection-storage-sizeB
Read-only

Gets the size of the collection

ParametersJSON Schema
NameRequiredDescriptionDefault
databaseYesDatabase name
collectionYesCollection name

Output Schema

ParametersJSON Schema
NameRequiredDescription
sizeYes
unitsYes

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description adds no behavioral traits beyond what the annotations already provide. The annotations declare readOnlyHint=true and destructiveHint=false, and the description merely restates the tool's name ('gets the size'). No additional context about return format, units, or performance implications is given.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence with no filler or redundant information. It is well-structured and front-loaded, achieving maximum conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple with two well-documented parameters and safe annotations. However, the description does not clarify what 'size' means (e.g., storage bytes vs. document count) and lacks usage guidance or differentiation from comparable tools. An output schema exists (per context), which covers return values, but the ambiguity around 'size' remains.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema provides 100% coverage with clear descriptions for both parameters ('Database name' and 'Collection name'). The tool description does not add extra meaning beyond the schema, so the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function with a specific verb and resource: 'Gets the size of the collection.' It is unambiguous but does not distinguish from related sibling tools like 'db-stats' or 'count,' which could also provide size-related information.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, no prerequisites, and no exclusions. It simply defines what the tool does without contextual usage information.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

connectA
Read-only

Connect to a MongoDB instance. The config resource captures if the server is already connected to a MongoDB cluster. If the user has configured a connection string or has previously called the connect tool, a connection is already established and there's no need to call this tool unless the user has explicitly requested to switch to a new MongoDB cluster.

ParametersJSON Schema
NameRequiredDescriptionDefault
connectionStringYesMongoDB connection string (in the mongodb:// or mongodb+srv:// format)

Output Schema

ParametersJSON Schema
NameRequiredDescription
connectedYes

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description goes beyond the readOnlyHint/destructiveHint annotations by explaining the connection state persistence through a config resource and the idempotency-like behavior (no need to reconnect unless switching). It does not describe failure modes or what happens to the existing connection during a switch, but given the presence of an output schema and annotations, the added context is valuable and sufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences, front-loaded with the core purpose, and each subsequent sentence adds meaningful usage context. There is no redundant filler; every sentence contributes to the agent's understanding of when and how to use the tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (one required parameter, no nested objects), the description, combined with the schema and annotations, fully covers the necessary information. It explains the tool's purpose, connection state tracking, and when to avoid calling it. The presence of an output schema means return format does not need to be described in prose.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already documents the connectionString parameter fully with a description that includes the expected URI format. The tool description adds no new parameter-specific semantics—it only discusses when the parameter may already be configured, which is contextual but not about the parameter's meaning or syntax. With 100% schema coverage, the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a clear, specific verb and resource: 'Connect to a MongoDB instance.' This immediately distinguishes the tool from sibling data-operation tools like find, aggregate, and create-collection. It also explains the tool's role in managing server connections, which is unique among the siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to call the tool and when not to: it states that if a connection string is configured or connect was already called, there's no need to call it again unless switching clusters. This gives the agent clear decision-making criteria, surpassing typical usage notes.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

countA
Read-only

Gets the number of documents in a MongoDB collection using db.collection.count() and query as an optional filter parameter

ParametersJSON Schema
NameRequiredDescriptionDefault
queryNoA filter/query parameter. Allows users to filter the documents to count. Matches the syntax of the filter argument of db.collection.count().
databaseYesDatabase name
collectionYesCollection name

Output Schema

ParametersJSON Schema
NameRequiredDescription
countYesThe number of documents in the collection

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and destructiveHint=false, establishing safety. The description adds that it uses db.collection.count() and that query is optional, which clarifies the operation. However, it does not disclose potential nuances such as exact vs. estimated counts, performance implications, or behavior with large collections, so it adds only minor context beyond annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence that front-loads the primary purpose and includes the method name. Every word adds value, with no redundancy or extraneous detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a straightforward counting tool with an output schema present, the description covers the essential functionality and optional filtering. It does not explain return values, but the output schema likely handles that. It could mention performance limitations or distinction from similar tools, but given the tool's simplicity, the description is sufficiently complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already provides 100% coverage with clear descriptions for database, collection, and query. The description mentions query as an optional filter and relates it to the syntax of db.collection.count(). This slightly reinforces the schema but does not add substantial new meaning beyond what is already present.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: 'Gets the number of documents in a MongoDB collection' with a specific verb and resource. It also names the underlying method (db.collection.count()), which adds precision. However, it does not explicitly distinguish this tool from siblings like aggregate or find, which can also return counts.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions that query is an optional filter parameter, implying the tool is used to count filtered documents. It does not provide explicit guidance on when to choose this over alternatives (e.g., find or aggregate), nor does it state exclusions or prerequisites. The usage context is present but not fully developed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

create-collectionA

Creates a new collection in a database. If the database doesn't exist, it will be created automatically.

ParametersJSON Schema
NameRequiredDescriptionDefault
databaseYesDatabase name
collectionYesCollection name

Output Schema

ParametersJSON Schema
NameRequiredDescription
createdYes
databaseYes
collectionYes

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=false and destructiveHint=false, so the description's job is to add extra behavioral nuance. It discloses that the database is created automatically if absent, which is beyond the annotations. It doesn't mention behavior like existing-collection handling, but that is not required given the annotations provide the safety profile.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two short sentences that are front-loaded with the core action. Every word earns its place, and the auto-create note adds valuable context without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with two parameters, an output schema, and safety annotations, the description is adequate and covers the primary behavior. It omits edge cases like what happens if the collection already exists, but given the complexity, this is a minor gap. The presence of an output schema reduces the need to describe return values.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema covers both parameters with descriptions ('Database name', 'Collection name'), achieving 100% coverage, so the baseline is 3. The description does not enrich parameter meanings beyond the auto-create effect on the database parameter; no format, constraints, or examples are added.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action: 'Creates a new collection in a database.' The verb 'creates' and resource 'collection in a database' are specific and unambiguous, distinguishing it from sibling tools like drop-collection and rename-collection. The additional note about auto-creating the database clarifies scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage (when you need to create a collection) but provides no explicit when-to-use or alternative guidance. The auto-create behavior is a useful context cue, but no exclusions or comparisons to sibling tools like insert-many (which may also auto-create collections) are given.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

create-indexB

Create an index for a collection

ParametersJSON Schema
NameRequiredDescriptionDefault
nameNoThe name of the index
databaseYesDatabase name
collectionYesCollection name
definitionYesThe index definition. Use 'classic' for standard indexes, 'vectorSearch' for vector search indexes, and 'search' for Atlas Search (lexical) indexes.

Output Schema

ParametersJSON Schema
NameRequiredDescription
databaseYes
indexNameYes
indexTypeYes
collectionYes

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The annotations (readOnlyHint=false, destructiveHint=false) indicate a write operation that is not destructive, and the description's 'create' is consistent with this. However, the description adds no additional behavioral context such as performance implications, permission requirements, or side effects like index building time. With annotations present, the description contributes no extra transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence, 'Create an index for a collection', which is easily scannable and contains no redundant information. It is front-loaded with the action and every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complex schema with multiple index types and an output schema, the brief description is supplemented by detailed structured data. However, the description alone does not convey the breadth of supported index types or usage nuances like search indexes requiring explicit user requests, though those are documented in the schema. Overall, the description is adequate but not rich.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema provides 100% description coverage for all parameters, including detailed explanations for database, collection, name, and the complex definition array with its nested variants. The tool description itself mentions no parameters, but the schema already offers comprehensive semantics, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses the specific verb 'create' with the resource 'index' and scopes it to 'a collection', clearly conveying the tool's primary action. It distinguishes from drop-index by stating the action, though it does not explicitly mention the different index types (classic, vectorSearch, search) which the schema details. Overall, the purpose is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like collection-indexes or drop-index. It simply states the action without context about prerequisites, typical use cases, or situations where a different index-related tool should be used. This is a functional statement but lacks usage guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

db-statsB
Read-only

Returns statistics that reflect the use state of a single database

ParametersJSON Schema
NameRequiredDescriptionDefault
databaseYesDatabase name

Output Schema

ParametersJSON Schema
NameRequiredDescription
statsYes

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The annotations already declare readOnlyHint=true and destructiveHint=false, so the agent knows this is a safe read operation. The description adds the phrase 'use state' but does not specify what statistics are included, error handling, or behavior if the database does not exist. It provides minimal additional context beyond what the annotations imply, but it is consistent and not misleading.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence that immediately states the purpose. It is front-loaded with the key information and contains no filler or redundancy. The length is appropriate for a tool with one parameter and no complex behavior.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read-only stats tool with one parameter and an output schema present, the description is mostly complete. It clearly indicates the resource and action, and the output schema handles return value details. However, the vague term 'use state' leaves some ambiguity about what statistics are included, but this is a minor gap given the output schema and annotations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage for the single 'database' parameter, with the description 'Database name'. The tool description does not add any additional meaning or examples for the parameter, so the schema already carries the full semantic load. The baseline of 3 is appropriate since the description adds no extra value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the tool as returning statistics about a specific database, using the verb 'returns' and a clear resource. It distinguishes this from the siblings list, which includes database-level management operations like drop-database and list-databases. However, it doesn't explicitly name alternatives or elaborate on what 'use state' includes, so it's clear but not fully differentiated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives such as list-databases or collection-storage-size. It does not state any prerequisites, exclusions, or scenarios where this tool is preferred. The only implied usage is that it is for retrieving statistics for one database, but no explicit context or alternative comparison is given.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

delete-manyA
Destructive

Removes all documents that match the filter from a MongoDB collection

ParametersJSON Schema
NameRequiredDescriptionDefault
filterNoThe query filter, specifying the deletion criteria. Matches the syntax of the filter argument of db.collection.deleteMany()
databaseYesDatabase name
collectionYesCollection name

Output Schema

ParametersJSON Schema
NameRequiredDescription
databaseYes
collectionYes
deletedCountYes

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The destructiveHint annotation already flags the destructive nature, and the description adds the scope of deletion (all matching documents). However, it fails to disclose the critical edge case that omitting the filter deletes all documents in the collection, which is a significant safety concern for a bulk deletion tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that is front-loaded with the core action and resource. It contains no fluff or redundant information, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

While the destructiveHint annotation and schema cover many aspects, the description misses a crucial safety warning about the empty-filter case, which can delete the entire collection. Given the tool's high destructiveness, the description should explicitly caution about this behavior. The description is adequate but not complete for such an operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with each parameter (filter, database, collection) adequately described. The filter parameter includes a detailed reference to MongoDB's deleteMany syntax. The tool description itself adds no additional parameter semantics beyond what the schema already provides, so the baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Removes all documents that match the filter from a MongoDB collection' clearly states the verb (removes), the resource (documents in a collection), and the scope (all that match filter). It distinguishes itself from sibling tools like drop-collection (removes the entire collection) and update-many (modifies documents).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a clear context for when to use the tool: when you need to delete multiple documents matching a filter from a MongoDB collection. However, it does not explicitly mention alternatives or when-not-to-use scenarios, such as using find+delete for smaller operations or drop-collection for removing the entire collection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

drop-collectionA
Destructive

Removes a collection or view from the database. The method also removes any indexes associated with the dropped collection.

ParametersJSON Schema
NameRequiredDescriptionDefault
databaseYesDatabase name
collectionYesCollection name

Output Schema

ParametersJSON Schema
NameRequiredDescription
droppedYes
databaseYes
collectionYes

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate destructive behavior (destructiveHint=true, readOnlyHint=false). The description adds valuable context beyond annotations by noting that associated indexes are also removed and that views are included. This discloses side effects not captured by annotations, though it doesn't discuss permissions or reversibility, which is acceptable given the destructive hint.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the primary action, and each sentence adds value. It is concise without unnecessary elaboration, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple destructive operation with clear annotations and an output schema, the description sufficiently covers the operation and its side effects. It is complete for an agent to understand what will happen without needing additional details about return values or prerequisites.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with both parameters ('database' and 'collection') adequately described as names. The description does not add further parameter semantics, but the schema handles it. Baseline of 3 applies because the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action: 'Removes a collection or view from the database.' It specifies the resource (collection or view) and the effect (removal). It also mentions associated indexes, distinguishing it from sibling tools like drop-database or drop-index. The purpose is unambiguous and specific.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context on what the tool does, implying when to use it (when you need to remove a specific collection or view). It doesn't explicitly mention alternatives or exclusions, but the action is specific enough that the use case is evident, especially with sibling tool names available.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

drop-databaseA
Destructive

Removes the specified database, deleting the associated data files

ParametersJSON Schema
NameRequiredDescriptionDefault
databaseYesDatabase name

Output Schema

ParametersJSON Schema
NameRequiredDescription
droppedYes
databaseYes

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare destructiveHint=true, so the description's mention of deleting data files is consistent but adds only minimal additional context. It does not disclose other behaviors like irreversibility, permissions, or failure modes.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single clear sentence with no unnecessary words. It front-loads the core action and communicates the destructive effect efficiently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simple nature of the tool, the description covers the essential function. The destructive hint is supplemented by the annotation, and an output schema exists. Missing usage guidance is the main gap, but that is handled under usage guidelines.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with the parameter description 'Database name' being straightforward. The description does not add further meaning beyond what the schema already provides, so the baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb 'Removes' with resource 'the specified database' and clarifies scope by adding 'deleting the associated data files'. This distinguishes it from sibling tools like drop-collection, which operate at a different level.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description states only what the tool does, with no guidance on when to use it versus alternatives such as drop-collection or delete-many. No exclusions, prerequisites, or context are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

drop-indexA
Destructive

Drop an index for the provided database and collection.

ParametersJSON Schema
NameRequiredDescriptionDefault
typeYesThe type of index to be deleted. Use 'classic' for standard indexes and 'search' for atlas search and vector search indexes.
databaseYesDatabase name
indexNameYesThe name of the index to be dropped.
collectionYesCollection name

Output Schema

ParametersJSON Schema
NameRequiredDescription
droppedYes
databaseYes
indexNameYes
collectionYes

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare destructiveHint=true and readOnlyHint=false. The description does not add extra behavioral details such as irreversibility or permission requirements, but it is consistent with the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence that directly states the tool's purpose without unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the destructive nature, the description is minimal but sufficient because annotations and output schema cover safety and return information. It could mention side effects like permanence, but the core context is present.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema provides complete descriptions for all 4 parameters, including enum values for 'type'. The description adds no additional parameter semantics beyond what is already in the schema, so the score is at the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the action (Drop), the object (an index), and the scope (database and collection). This distinguishes it from sibling tools like drop-collection and drop-database.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a clear context for the operation but does not explicitly state when to use this tool versus alternatives. No references to sibling tools or exclusions are mentioned, so usage guidance is implied rather than explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

explainA
Read-only

Returns statistics describing the execution of the winning plan chosen by the query optimizer for the evaluated method

ParametersJSON Schema
NameRequiredDescriptionDefault
methodYesThe method and its arguments to run
databaseYesDatabase name
verbosityNoThe verbosity of the explain plan, defaults to queryPlanner. If the user wants to know how fast is a query in execution time, use executionStats. It supports all verbosities as defined in the MongoDB Driver.queryPlanner
collectionYesCollection name

Output Schema

ParametersJSON Schema
NameRequiredDescription
methodYes
verbosityYes
explainResultYes

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description adds the useful detail that the tool reports on the 'winning plan chosen by the query optimizer,' implying it evaluates query planning rather than just returning raw results. It also mentions 'execution,' which hints that queries may actually run to collect statistics. However, annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. No additional behavioral traits (e.g., performance implications, permission needs) are disclosed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, focused sentence that front-loads the action ('Returns statistics') and specifies exactly what the statistics describe. There is no fluff, repetition, or tangential information. It is appropriately compact given the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is moderately complex (4 params, nested method schema, enum verbosity), but the extensive schema descriptions cover all parameters and their meanings. The main description provides a clear high-level purpose, and an output schema exists, so return values don't need explanation. The only gap is the lack of explicit use-case hints, but that's not a completeness issue given the schema richness and annotations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with all four parameters (database, collection, method, verbosity) having descriptions. The main description adds no parameter-specific meaning beyond the schema. For example, the schema's verbosity description explains the trade-offs between queryPlanner and executionStats, which is richer than anything in the main text. Baseline 3 is appropriate since the description doesn't need to compensate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific action and resource: 'Returns statistics describing the execution of the winning plan chosen by the query optimizer for the evaluated method.' It distinguishes this tool from siblings like find/aggregate (which execute queries and return results) by focusing on query plan analysis. The verb 'Returns' makes the primary function explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, nor any exclusions or prerequisites. It does not state 'use this to analyze query performance' or contrast with sibling tools. The only usage hint is buried in the schema's verbosity parameter description (e.g., use executionStats for execution time), which is about verbosity selection, not tool selection. The agent is left to infer when to invoke explain.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

exportB
Read-only

Export a query or aggregation results in the specified EJSON format.

ParametersJSON Schema
NameRequiredDescriptionDefault
databaseYesDatabase name
collectionYesCollection name
exportTitleYesA short description to uniquely identify the export.
exportTargetYesThe export target along with its arguments.
jsonExportFormatNoThe format to be used when exporting collection data as EJSON with default being relaxed. relaxed: A string format that emphasizes readability and interoperability at the expense of type preservation. That is, conversion from relaxed format to BSON can lose type information. canonical: A string format that emphasizes type preservation at the expense of readability and interoperability. That is, conversion from canonical to BSON will generally preserve type information except in certain specific cases.relaxed

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description only states the action without detailing behavioral aspects like whether the export is returned as a file or string, or if any side effects occur. The annotations already indicate read-only and non-destructive behavior, so the description adds no new insights.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a concise single sentence with no redundant words. It front-loads the action and clearly communicates the core function without unnecessary detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite the tool's complexity—including nested exportTarget objects for find and aggregate operations and four required parameters—the description offers minimal high-level context. It does not mention the need for database/collection or how the export is performed, making it insufficient for an agent to fully understand the tool's scope.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description contains no parameter-specific information, but the input schema provides comprehensive descriptions for all parameters (100% coverage). The brief mention of 'specified EJSON format' does not add value beyond the schema's detailed explanation of jsonExportFormat.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: exporting query or aggregation results in EJSON format. It uses a specific verb and resource, and the mention of EJSON format distinguishes it from sibling tools like 'find' or 'aggregate' that return data without exporting.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, such as using 'find' or 'aggregate' for direct querying. No exclusions, prerequisites, or alternative tool references are given.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

findB
Read-only

Run a find query against a MongoDB collection

ParametersJSON Schema
NameRequiredDescriptionDefault
sortNoA document, describing the sort order, matching the syntax of the sort argument of cursor.sort(). The keys of the object are the fields to sort on, while the values are the sort directions (1 for ascending, -1 for descending).
limitNoThe maximum number of documents to return
filterNoThe query filter, matching the syntax of the query argument of db.collection.find()
databaseYesDatabase name
collectionYesCollection name
projectionNoThe projection, matching the syntax of the projection argument of db.collection.find()
responseBytesLimitNoThe maximum number of bytes to return in the response. This value is capped by the server's configured maxBytesPerQuery and cannot be exceeded. Note to LLM: If the entire query result is required, use the "export" tool instead of increasing this limit.

Output Schema

ParametersJSON Schema
NameRequiredDescription
documentsYesThe documents returned by the find query
appliedLimitsYesThe limits applied to the find query
queryResultsCountNoThe total number of documents returned by the find query

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safe read-only nature is established. The description adds no behavioral context beyond that, but it is consistent and does not contradict annotations. The schema contributes default limits and response byte caps, but those are not part of the description itself.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence with no filler, earning its place by specifying the target (MongoDB collection). It is appropriately short, though it could be more informative without becoming verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (7 parameters, nested objects, output schema, annotations), the description is minimal but covers the core function. It does not mention default limit or return behavior, but the schema and output schema fill those gaps. The description alone is adequate but not rich.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with detailed descriptions for all seven parameters including sort syntax, filter syntax, limit default, and responseBytesLimit. The main description adds no parameter semantics, but the schema carries the full burden, meeting the baseline for high coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('Run a find query against a MongoDB collection'), clearly indicating a read operation. However, it does not explicitly distinguish from sibling tools like aggregate or count, though the term 'find' is a MongoDB-specific operation name.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description lacks explicit when-to-use guidance. However, the schema's responseBytesLimit parameter description provides a clear alternative: if the entire query result is required, use the export tool instead. This gives some usage direction but does not cover alternatives like aggregate or count.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

insert-manyA

Insert an array of documents into a MongoDB collection. If the list of documents is above com.mongodb/maxRequestPayloadBytes, consider inserting them in batches.

ParametersJSON Schema
NameRequiredDescriptionDefault
databaseYesDatabase name
documentsYesThe array of documents to insert, matching the syntax of the document argument of db.collection.insertMany().
collectionYesCollection name

Output Schema

ParametersJSON Schema
NameRequiredDescription
databaseYes
collectionYes
insertedIdsYes
insertedCountYes

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate this is a write operation (readOnlyHint=false) and not destructive (destructiveHint=false). The description adds a useful performance constraint about payload size limits, but does not address other behavior like partial insert failures or ordering. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is exactly two sentences. The first states the purpose directly; the second gives a specific operational tip. No wasted words, and the key information is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple 3-parameter insert tool with an output schema, the description covers the main action and an important operational constraint (batching for large arrays). It does not need to explain return values because an output schema exists. The only minor gap is lack of guidance on when to choose this over alternatives, but the tool is self-explanatory.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with each parameter (database, collection, documents) already described in the schema. The tool description only paraphrases 'array of documents' without adding new parameter-level information, so it stays at the baseline for high coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description says 'Insert an array of documents into a MongoDB collection,' which is a specific verb+resource statement. It clearly distinguishes this from sibling tools like delete-many, update-many, and aggregate by naming the exact operation and target.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a clear usage guideline for large payloads: 'If the list of documents is above com.mongodb/maxRequestPayloadBytes, consider inserting them in batches.' This gives the agent actionable context, though it does not explicitly mention alternatives or when-not-to-use scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list-collectionsA
Read-only

List all collections for a given database

ParametersJSON Schema
NameRequiredDescriptionDefault
databaseYesDatabase name

Output Schema

ParametersJSON Schema
NameRequiredDescription
totalCountYes
collectionsYes

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and destructiveHint=false, which fully covers the safety profile. The description adds minimal behavioral context beyond the scope of 'all collections', but no additional info is necessary.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence of seven words, front-loaded with the verb and resource. Every word contributes value and there is no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple with one required parameter and an output schema. The description sufficiently conveys the scope of the operation, and the output schema covers return values, making it adequately complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 100% coverage for the single parameter with a description of 'Database name'. The tool description reinforces the role of the database parameter but adds no extra meaning, so the baseline applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's action (List) and resource (collections) with a qualifier (for a given database). This distinguishes it from sibling tools like list-databases and collection-schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The context is clear: use this when you need to enumerate all collections in a specified database. No explicit alternatives or exclusions are mentioned, but for this simple operation the implied usage is adequate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list-databasesA
Read-only

List all databases for a MongoDB connection

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
databasesYes
totalCountYes

TDQS

A4.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The annotations already declare readOnlyHint=true and destructiveHint=false, so the agent knows this is a safe read operation. The description adds minimal behavioral context beyond the annotations, such as no mention of pagination or return format. This meets the baseline but does not provide extra value beyond what the annotations already convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence that is front-loaded with the verb 'List' and directly states the action and resource. Every word is meaningful, with no redundancy or filler. This is an example of efficient structure.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple with no parameters, and the annotations provide the safety profile. An output schema exists to document return values, so the description does not need to explain them. The description adequately covers the tool's purpose for an agent, making the definition complete for this straightforward operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters and an empty input schema, so there is no parameter information to convey. The description correctly implies that no arguments are required. A baseline score of 4 is appropriate for empty parameter lists, as the description adds no unnecessary parameter details.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('List') and resource ('databases'), clearly stating the tool's function as listing all databases for a MongoDB connection. This distinguishes it from sibling tools such as 'list-collections' by specifying the scope of databases rather than collections.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description clearly indicates the context of use: listing databases for a MongoDB connection. However, it does not explicitly mention alternatives or exclusions, such as noting that 'list-collections' should be used for collections instead. This is a minor gap, so it earns a 4 rather than a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list-knowledge-sourcesA
Read-only

List available data sources in the MongoDB Assistant knowledge base. Use this to explore available data sources or to find search filter parameters to use in search-knowledge.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and destructiveHint=false, so the read-only nature is established. The description adds context about the knowledge base and its role in finding filter parameters, but it does not provide additional behavioral details such as pagination, output format, or side effects. This meets the expected bar for a simple listing tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is only two sentences, front-loaded with the action verb and resource. The second sentence adds practical usage guidance without any redundant fluff. Every word contributes to the tool's understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read-only listing tool with no parameters and no output schema, the description is complete: it states what is listed, where (MongoDB Assistant knowledge base), and why it is useful (exploration and finding search filter parameters). It could mention the return format, but that is not critical for a list tool with such clear purpose.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, and the schema description coverage is vacuously 100%. Per the baseline rule for 0-parameter tools, the score is 4. The description does not need to explain parameters, and it correctly mentions that filter parameters for search-knowledge can be discovered from this tool.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: listing available data sources in the MongoDB Assistant knowledge base. It is specific with a clear verb and resource, and distinguishes itself from sibling tools like list-collections and list-databases by focusing on the knowledge base and referencing search-knowledge.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly tells users when to use this tool: to explore data sources or to find filter parameters for search-knowledge. It provides clear context for its use, though it does not explicitly mention alternatives or when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

mongodb-logsA
Read-only

Returns the most recent logged mongod events

ParametersJSON Schema
NameRequiredDescriptionDefault
typeNoThe type of logs to return. Global returns all recent log entries, while startupWarnings returns only warnings and errors from when the process started.global
limitNoThe maximum number of log entries to return.

Output Schema

ParametersJSON Schema
NameRequiredDescription
logsYes
shownCountYes
totalLinesWrittenYes

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and destructiveHint=false, covering the safety profile. The description adds context that logs are returned in reverse chronological order (most recent first), but it does not disclose details like the default limit, maximum entries, or behavior when no logs exist. Since annotations cover the main behavioral risk, a score of 3 is appropriate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence that conveys the core purpose without extraneous words. It is front-loaded with the verb and resource, making it quickly scannable by an agent.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the presence of a fully described input schema (100% coverage) and an output schema, the description sufficiently covers the tool's purpose and scope. For a simple read-only log retrieval tool, this is complete; the schema handles parameter constraints and return format details.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents the 'type' and 'limit' parameters. The description adds no additional parameter-level semantics beyond what the schema provides, so the baseline score of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns the most recent logged mongod events, using a specific verb (returns), resource (mongod logs), and scope qualifier (most recent). This distinguishes it from sibling tools like find or aggregate, which operate on collections rather than server logs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, nor does it mention exclusions or prerequisites. For example, it does not clarify whether this is for server diagnostics vs. database operations, or when a user might prefer a different read tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

rename-collectionB

Renames a collection in a MongoDB database

ParametersJSON Schema
NameRequiredDescriptionDefault
newNameYesThe new name for the collection
databaseYesDatabase name
collectionYesCollection name
dropTargetNoIf true, drops the target collection if it exists

Output Schema

ParametersJSON Schema
NameRequiredDescription
renamedYes
databaseYes
newCollectionYes
oldCollectionYes

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description adds no behavioral context beyond the basic rename operation. Annotations indicate non-read-only and non-destructive, but the description does not explain side effects, such as behavior when the target exists (covered only in schema) or any impact on dependent references.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single succinct sentence that front-loads the core action. It contains no unnecessary words and earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple operation, the description is minimally adequate. The schema covers parameters and an output schema exists. However, it lacks usage context and critical behavioral details (e.g., what happens if the target collection exists), which are only implicitly addressed in the parameter description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description itself adds no parameter-specific detail, but the schema fully documents each parameter, including dropTarget's behavior, so no additional semantics are needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the operation: 'Renames a collection in a MongoDB database.' It uses a specific verb and resource, distinguishing it from sibling tools like create-collection or drop-collection.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. It does not mention exclusions or prerequisites, leaving the agent without context for optimal tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search-knowledgeA
Read-only

Search for information in the MongoDB Assistant knowledge base. This includes official documentation, curated expert guidance, and other resources provided by MongoDB. Supports filtering by data source and version.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoThe maximum number of results to return
queryYesA natural language query to search for in the MongoDB Assistant knowledge base. This should be a single question or a topic that is relevant to the user's MongoDB use case.
dataSourcesNoA list of one or more data sources to limit the search to. You can specify a specific version of a data source by providing the version label. If not provided, the latest version of all data sources will be searched. Available data sources and their versions can be listed by calling the list-knowledge-sources tool.

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and destructiveHint=false, so safety is covered. The description adds context about the content scope (official documentation, curated guidance) but does not disclose return behavior, pagination, or any other caveats. No contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the primary action, and contains no unnecessary detail. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple search tool with no output schema and fully described parameters, the description sufficiently covers purpose, content scope, and filtering. The schema covers parameter details, and annotations cover safety, so no significant gaps remain.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with all three parameters (query, limit, dataSources) fully described. The main description adds no additional parameter semantics beyond what the schema already provides, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: searching the MongoDB Assistant knowledge base, with explicit scope (official docs, curated guidance) and filtering capabilities. It distinguishes itself from sibling tools like list-knowledge-sources and database operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context on when to use this tool (searching the knowledge base) and mentions filtering by data source/version, but does not explicitly name alternatives or exclusions. The schema's dataSources description mentions list-knowledge-sources, but this is not in the main description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

update-manyA

Updates all documents that match the specified filter for a collection. If the list of documents is above com.mongodb/maxRequestPayloadBytes, consider updating them in batches.

ParametersJSON Schema
NameRequiredDescriptionDefault
filterNoThe selection criteria for the update, matching the syntax of the filter argument of db.collection.updateOne()
updateYesAn update document describing the modifications to apply using update operator expressions
upsertNoControls whether to insert a new document if no documents match the filter
databaseYesDatabase name
collectionYesCollection name

Output Schema

ParametersJSON Schema
NameRequiredDescription
databaseYes
collectionYes
upsertedIdNo
matchedCountYes
modifiedCountYes
upsertedCountYes

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description adds the batching consideration, which is a useful operational detail. However, it does not disclose other behavioral traits such as the potentially large scope of updates, atomicity, or irreversibility, which are relevant for a mutation tool. The annotations already indicate it is not read-only, so the description adds moderate context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences: the first clearly states the core action, and the second adds a useful operational tip. There is no redundancy or wasted wording.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description, combined with the thoroughly documented input schema and presence of an output schema, provides sufficient context for basic use. It covers the main behavior and includes a batching tip. Minor gaps exist (e.g., not mentioning atomicity or side effects), but these are not critical given the schema completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already covers all parameters with 100% description coverage, so the schema carries the burden. The description does not add any parameter-specific semantics beyond what is in the schema, earning the baseline score of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool updates all documents matching a filter in a collection, using the specific verb 'Updates' and identifying the resource. This distinguishes it from sibling tools like delete-many, find, and insert-many.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a practical guideline about batching updates when the payload exceeds a size limit, implying when to use this tool. However, it does not explicitly mention alternatives or when to prefer this over similar tools, leaving usage context partially implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 25 tool updatesv1.14.0
    • First observedaggregate
    • First observedaggregate-db
    • First observedcollection-indexes
    • First observedcollection-schema
    • First observedcollection-storage-size
    • First observedconnect
    • First observedcount
    • First observedcreate-collection
    • First observedcreate-index
    • First observeddb-stats
    • First observeddelete-many
    • First observeddrop-collection
    • First observeddrop-database
    • First observeddrop-index
    • First observedexplain
    • First observedexport
    • First observedfind
    • First observedinsert-many
    • First observedlist-collections
    • First observedlist-databases
    • First observedlist-knowledge-sources
    • First observedmongodb-logs
    • First observedrename-collection
    • First observedsearch-knowledge
    • First observedupdate-many

TDQS

A3.5/5.0

Scored across 25 tools

Disambiguation4/5

Most tools have distinct targets (e.g., drop-collection vs drop-database, create-index vs collection-indexes). However, aggregate and aggregate-db are nearly identical at different scopes, and collection-storage-size and db-stats could be confused.

Naming Consistency3/5

All names use kebab-case, but the pattern is mixed: verb-noun for actions (drop-collection, create-index) vs noun-descriptive for metadata (collection-indexes, db-stats, mongodb-logs). Also, 'aggregate' and 'aggregate-db' are inconsistent.

Tool Count4/5

25 tools is above the preferred 3-15 range but justified for a comprehensive MongoDB server covering CRUD, indexes, schema, stats, aggregation, and knowledge search. It feels slightly heavy but not bloated.

Completeness4/5

Covers core MongoDB operations: collection/database lifecycle, CRUD, indexes, aggregation, stats, export, and logs. Missing single-document operations (insert-one, update-one, delete-one) but find and list-collections fill most gaps.

Maintenance

ActivityMaintained
ResponsivenessSyncing

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    A
    maintenance
    A Model Context Protocol server that provides access to MongoDB databases. This server enables LLMs to inspect collection schemas and execute read-only queries.
    8
    230 npm
    282
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that enables LLMs to interact directly with MongoDB databases, allowing users to query collections, inspect schemas, and manage data through natural language.
    28 npm
    2
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that enables LLMs to interact directly with MongoDB databases, allowing users to query collections, inspect schemas, and manage data through natural language.
    28 npm
    MIT
  • A
    license
    B
    quality
    A
    maintenance
    A Model Context Protocol server that enables AI assistants to interact with MongoDB Atlas resources through natural language, supporting database operations and Atlas management functions.
    28
    139,525 npm
    1,138
    Apache 2.0