smithery/context-engine-ai

mcp-tool-selection

Decision rules for when to use MCP Qdrant-Indexer semantic search vs grep/literal file tools. Use this skill when starting exploration, debugging, or answering "where/why" questions about code.

Installation

$ npx skills add smithery/context-engine-ai --skill mcp-tool-selection

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery/context-engine-ai.

npx skills add smithery/context-engine-ai

Browse all from smithery/context-engine-ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 5,127 B
  • docs SUMMARY.md 219 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

MCP Tool Selection Rules

Core principle: MCP Qdrant-Indexer tools are primary for exploring code and history. Start with MCP for exploration, debugging, or "where/why" questions; use literal search/file-open only for narrow exact-literal lookups.

STOP — Do NOT Use Read File or Grep for Exploration

DO NOT use Read File, grep, ripgrep, cat, find, or any filesystem search tool for code exploration. You have MCP tools that are faster, smarter, and return ranked, contextual results.

  • About to Read a file to understand it? → use search or reposearch or contextanswer
  • About to grep for a symbol? → use search or symbolgraph or searchcallers_for
  • About to grep -r for a concept? → use search with natural language
  • About to find/ls for project structure? → use qdrantstatus (with listall=true)

TIP: Use search as your DEFAULT tool — it auto-detects intent and routes to the best specialized tool.

The ONLY acceptable use of grep/Read: confirming exact literal strings (e.g., REDIS_HOST), or reading a file you already located via MCP for editing.

Use MCP Qdrant-Indexer When

  • Exploring or don't know exact strings/symbols
  • Need semantic or cross-file understanding (relationships, patterns, architecture)
  • Want ranked results with surrounding context, not just line hits
  • Asking conceptual/architectural or "where/why" behavior questions
  • Need rich context/snippets around matches
  • Finding callers, definitions, or importers of any symbol

Use Literal Search/File-Open Only When

  • Know exact string/function/variable or error message
  • Only need to confirm existence or file/line quickly (not to understand behavior)

Grep Anti-Patterns (DON'T)

grep -r "auth" .        # → Use MCP: "authentication mechanisms"
grep -r "cache" .       # → Use MCP: "caching strategies"  
grep -r "error" .       # → Use MCP: "error handling patterns"
grep -r "database" .    # → Use MCP: "database operations"
# Also DON'T:
Read File to understand a module  # → Use repo_search or context_answer
Read File to find callers         # → Use symbol_graph
find/ls for project structure     # → Use qdrant_status (list_all=true)

Literal Search Patterns (DO)

grep -rn "UserAlreadyExists" .      # Specific error class
grep -rn "def authenticate_user" .  # Exact function name
grep -rn "REDIS_HOST" .             # Exact environment variable

Quick Decision Heuristic

Question Type Tool
UNSURE / GENERAL QUERY MCP search — RECOMMENDED DEFAULT, auto-routes to best tool
"Where is X implemented?" MCP search or repo_search
"Search across multiple repos" MCP crossreposearch — PRIMARY for multi-repo, prefer over manual chains
"Trace frontend→backend flow" MCP crossreposearch(trace_boundary=true) — auto-extracts boundary keys
"Who calls this and show code?" MCP symbol_graph — DEFAULT for all graph queries, always available
"What does this call?" MCP symbolgraph (querytype="callees")
"Where is X defined?" MCP symbolgraph (querytype="definition")
"What imports X?" MCP symbolgraph (querytype="importers")
"Callers of callers? Multi-hop?" MCP symbolgraph (depth=2+) or graphquery
"What breaks if I change X?" MCP graph_query (impact analysis, transitive callers)
"Circular dependencies?" MCP graphquery (querytype="cycles")
"N independent searches at once?" batch_search (~75% token savings)
"N symbol queries at once?" batchsymbolgraph (~75% token savings)
"N graph queries at once?" batchgraphquery (~75% token savings)
"How does authentication work?" MCP context_answer
"High-level module overview?" MCP info_request (with explanations)
"Does REDIS_HOST exist?" Literal grep
"Why did behavior change?" searchcommitsfor + changehistoryfor_path

symbolgraph is ALWAYS available (Qdrant-backed). graphquery is available to all SaaS users (Memgraph-backed) for advanced traversals: impact analysis, circular dependencies, transitive callers/callees. In self-hosted, requires NEO4JGRAPH=1 or MEMGRAPHGRAPH=1. If graphquery is not in your tool list, use symbolgraph for everything.

Batch tools (batchsearch, batchsymbolgraph, batchgraph_query) run N independent queries in one MCP invocation with ~75% token savings. Max 10 queries per batch. Use when you have 2+ independent queries of the same type.

crossreposearch discovery modes: "auto" (default), "always" (force discovery), "never" (skip). Use trace_boundary=true to extract API routes, event names, types.

If in doubt → start with search (unified MCP tool that auto-routes to the best specialized tool)