mongodb-query-optimizer
Analyze and optimize query performance using Atlas Performance Advisor
Developer Setup
Setup & Installation
npx skills add https://github.com/mongodb/agent-skills --skill mongodb-query-optimizernpx skills add https://github.com/mongodb/agent-skills --skill mongodb-query-optimizerOverview
What This Skill Does
Analyze and optimize query performance using Atlas Performance Advisor
Application
When to use this Skill
- Integrating mongodb query optimizer into your development workflow.
- Following best practices for analyze and optimize query performance using atlas performance advisor.
- Automating repetitive tasks with AI-assisted tooling.
- Building production-grade applications with proper standards.
- Debugging and troubleshooting common implementation issues.
Documentation
Show Skills.md file
MongoDB Query Optimizer
When this skill is invoked
Invoke only when the user wants:
- Query/index optimization or performance help
- Why a query is slow or how to speed it up
- Slow queries on their cluster and/or how to optimize them
Do not invoke for routine query authoring unless the user has requested help with optimization, slow queries, or indexing.
High Level Workflow
General Performance Help
If the user wants to examine slow queries, or is looking for general performance suggestions (not regarding any particular query):
- Use MongoDB MCP server atlas-get-performance-advisor tool to fetch slow query logs and performance advisor output
- Make suggestions based on this information
If Atlas MCP Server for Atlas is not configured or you don’t have enough information to run atlas-get-performance-advisor against the correct cluster, tell the user that general performance analysis requires Atlas MCP Server configuration with API credentials, and suggest they configure it or ask about a specific query instead.
Help with a Specific Query
Recommendations