Guides MongoDB users through implementing and optimizing Atlas Search (full-text), Vector Search (semantic), and Hybrid Search solutions. Use this skill when users need to build search functionality for text-based queries (autocomplete, fuzzy matching, faceted search), semantic similarity (embeddings, RAG applications), or combined approaches. Also use when users need text containment, substring matching ('contains', 'includes', 'appears in'), case-insensitive or multi-field text search, or filtering across many fields with variable combinations. Provides workflows for selecting the right search type, creating indexes, constructing queries, and optimizing performance using the MongoDB MCP server.
You are helping MongoDB users implement, optimize, and troubleshoot Atlas Search (lexical), Vector Search (semantic), and Hybrid Search (combined) solutions.
create, update, or delete operation tools you are in read-only mode; hand the user index JSON to create themselvesreferences/quick-start.md is a guided walkthrough that builds semantic, keyword, and hybrid search against the sample_mflix sample dataset. It is a teaching tour, not a way to build search for the user's own data.
Do not read references/quick-start.md until the user has chosen the tour. A general request like "I'm new to search, help me get started" can just as easily mean "help me add search to my app." Use AskUserQuestion:
"Two ways I can take this — which fits better?"
Prompts that should trigger this offer, rather than being answered directly as a question:
Skip the offer only when the intent is already unambiguous:
references/quick-start.md and start at its Step 0.If the user named a specific search type, carry that into the walkthrough: it skips its own path question and routes straight to that path, after its prerequisite steps.
The walkthrough requires an Atlas cloud cluster — the sample dataset loads from the Atlas UI, and Automated Embedding works on every Atlas tier with no key management. Atlas Local and self-managed MongoDB are out of scope; the walkthrough routes them back here when a step gives evidence of one.
Otherwise, continue with the Discovery Phase.
Check the environment:
list-databases and list-collections to understand available datacollection-schema to inspect field structurecollection-indexes to see existing indexesatlas-inspect-cluster to determine the cluster's MongoDB versionUnderstand the use case: If the user's request is vague:
Common questions to ask:
Match the use case to a search type below, then consult the linked reference file before recommending indexes or queries. Each reference file also documents the prerequisites you must verify first (cluster tier, MongoDB version, deployment type, auto-scaling).
Atlas Search (Lexical/Full-Text): Use when users need:
→ Consult both references/lexical-search-indexing.md (index) and references/lexical-search-querying.md (query).
Automated Embedding (Semantic search, no embedding code): Use when users need:
→ Consult references/automated-embedding.md.
Vector Search (Semantic, bring your own embeddings): Use when users need:
→ Consult references/vector-search.md.
Hybrid Search: Use when users need:
$rankFusion (rank-based) or $scoreFusion (score-based) to merge pipelines→ Consult references/hybrid-search.md, plus the lexical/vector files for the individual pipeline stages.
Creating indexes:
create-index tool after approvalRunning queries:
aggregate toolRefining existing queries:
aggregate to validate the resultsNEVER recommend $regex or $text for search use cases. Both lack the relevance scoring, fuzzy matching, and language-aware tokenization that search workloads need. If a user asks for either, explain why Atlas Search is more appropriate and show the equivalent pattern.
collection-schema, then confirm the intended field with the usercollection-indexes; if absent, the index must be created firstskillbazaar install mongodb-search-and-ai --agent claudeSign in (free) to install skills with the CLI.
Author
@mongodb
on GitHub
Published by