---
title: "MongoDB query optimizer: review, setup & limitations · Undominated.ai"
canonical: https://undominated.ai/skills/mongodb-query-optimizer/
description: "Official MongoDB skill that limits itself to slow-query and index work and names the MCP tools it expects for explain, indexes, and Atlas Performance Advisor."
---

# MongoDB query optimizer: review, setup & limitations · Undominated.ai

> Official MongoDB skill that limits itself to slow-query and index work and names the MCP tools it expects for explain, indexes, and Atlas Performance Advisor.

[← Explore all skills](/skills/)

DATABASES / MongoDB

# MongoDB query optimizer

Official MongoDB skill that limits itself to slow-query and index work and names the MCP tools it expects for explain, indexes, and Atlas Performance Advisor.

 [See setup guidance ↓](#setup)[Original source ↗](https://github.com/mongodb/agent-skills/tree/c370a63b27075008a92134686b24af3817edeb00/skills/mongodb-query-optimizer)

SOURCE REVIEW

 Reviewed 2026-10-15
 Evidence 4 linked sources
 Publisher MongoDB
 Licence [Apache-2.0 ↗](https://github.com/mongodb/agent-skills/blob/c370a63b27075008a92134686b24af3817edeb00/LICENSE)
 Revision c370a63b2707
 [Read what was—and wasn’t—checked ↓](#review)

“Help with MongoDB query optimization and indexing. Use only when the user asks for optimization or performance: "How do I optimize this query?", "How do I index this?", "Why is this query slow?", "Can you fix my slow queries?", "What are the slow queries on my cluster?", etc. Do not invoke for general MongoDB query writing unless user asks for performance or index help. Prefer indexing as optimization strategy. Use MongoDB MCP when available.”

 [MongoDB · upstream description ↗](https://github.com/mongodb/agent-skills/blob/c370a63b27075008a92134686b24af3817edeb00/skills/mongodb-query-optimizer/SKILL.md) Our analysis follows below.

01 / THE REASONING

## Why this made the selection.

 - The catalogue's MongoDB performance advisor is a GitHub Copilot agent, not this official skill.
- The skill names collection-indexes, explain, find, and atlas-get-performance-advisor instead of a generic index tip.

### A good fit for

 - Explaining one slow find or aggregation
- Asking Atlas Performance Advisor about a named cluster

### Weigh up before choosing

 - This review did not execute the skill or call MongoDB MCP tools.
- The user is told to create indexes unless tooling allows otherwise; that boundary was not tested.
- Reference examples linked from the skill were not opened.
- Index-removal suggestions are limited to recommendations from Atlas Performance Advisor in the source output rules.

02 / THE REVIEW RECORD

## What we actually inspected.

Source review has boundaries. A clear record is more useful than a “safe” badge.

### Material inspected

 - skills/mongodb-query-optimizer/SKILL.md
- README.md
- LICENSE

### Our findings

 - The skill says not to invoke it for routine query authoring unless the user asked about optimization, slow queries, or indexing.
- For one query it names collection-indexes, explain, and find, and it says to start explain in queryPlanner mode and look for COLLSCAN.
- Without Atlas API credentials it says general performance analysis requires Atlas MCP configuration, or the user should ask about a specific query instead.

### Not established by this review

 - The skill was not executed.
- No MongoDB MCP tool was called.
- No index was created.
- Not executed: it was not installed or run.

The review applies to the material and revision named here. A newer upstream release can change its behavior.

03 / PUT IT TO WORK

## Add a skill to your workflow.

[Upstream setup instructions ↗](https://github.com/mongodb/agent-skills/blob/c370a63b27075008a92134686b24af3817edeb00/README.md)

DOCUMENTED COMMAND

 npx skills add mongodb/agent-skills Copy command ↗

Run in your terminal to choose your AI tools, project or global scope, and installation method. This short command follows the current upstream version; the review covers the revision shown above.

 - The README says that command installs the skills and does not by itself configure an MCP server.
- MCP setup is a different command, npx "mongodb-mcp-server@latest" setup, which this review did not run.

### Before you start

 - A skills-compatible agent
- MongoDB MCP with a working connection string for explain tools
- Atlas API credentials for Performance Advisor

### Compatibility

MongoDB MCP server · Claude · Cursor · OpenAI Codex · GitHub Copilot · Grok

### Read indexes and explain plans

 - Read collection indexes, explain output, and a sample document
- Read Atlas Performance Advisor when API credentials exist
- Create indexes only if the user's tooling allows it

### Cost model

Apache-2.0; Atlas API credentials are required only for the advisor path

04 / FOLLOW THE EVIDENCE

## The source trail.

Our notes are separate from the original resource. Check upstream before adopting a new version.

 - [mongodb-query-optimizer SKILL.md ↗](https://github.com/mongodb/agent-skills/blob/c370a63b27075008a92134686b24af3817edeb00/skills/mongodb-query-optimizer/SKILL.md) Checked 2026-10-14 https://github.com/mongodb/agent-skills/blob/c370a63b27075008a92134686b24af3817edeb00/skills/mongodb-query-optimizer/SKILL.md Supports: invocation limits and tool names
- [Apache-2.0 LICENSE ↗](https://github.com/mongodb/agent-skills/blob/c370a63b27075008a92134686b24af3817edeb00/LICENSE) Checked 2026-10-14 https://github.com/mongodb/agent-skills/blob/c370a63b27075008a92134686b24af3817edeb00/LICENSE Supports: Apache-2.0
- [README ↗](https://github.com/mongodb/agent-skills/blob/c370a63b27075008a92134686b24af3817edeb00/README.md) Checked 2026-10-14 https://github.com/mongodb/agent-skills/blob/c370a63b27075008a92134686b24af3817edeb00/README.md Supports: install line and host list
- [Pinned source review C2-W09 ↗](https://raw.githubusercontent.com/mongodb/agent-skills/c370a63b27075008a92134686b24af3817edeb00/skills/mongodb-query-optimizer/SKILL.md) Checked 2026-10-15 https://raw.githubusercontent.com/mongodb/agent-skills/c370a63b27075008a92134686b24af3817edeb00/skills/mongodb-query-optimizer/SKILL.md Supports: upstreamDescription, limitations, review.notTested, review.reviewedAt

KEEP COMPARING

## Other approaches to consider.

Related by category or shared topics. These are alternatives to inspect, not a measured quality order.

 [### MongoDB schema design ↗ Pins MongoDB's schema-design skill, which separates read checks from writes and says write tools need an explicit yes.](/skills/mongodb-schema-design/)[### MongoDB Search and AI ↗ Chooses between Atlas Search, Vector Search, Automated Embedding and hybrid search, and creates indexes only after explicit approval.](/skills/mongodb-mongodb-search-and-ai/)[### Supabase Postgres Best Practices ↗ Connects Postgres schema and query decisions to worked SQL examples, connection guidance and row-level security checks.](/skills/supabase-supabase-postgres-best-practices/)

 [AI Tools ↗](/tools/)[Skills ↗](/skills/)[Agents ↗](/agents/)[MCP Servers ↗](/mcp-servers/)[Workflows ↗](/workflows/)

## Continue your investigation

 - [Choose a toolkit](/tools/)
- [Inspect execution hosts](/agents/)
- [Check tool access](/mcp-servers/)
- [Check project dependencies](/check-repo/)
