Agent skill

MCP Code Search Tool Selection

by Context-Engine-AI in Context-Engine-AI/Context-Engine

Rules for choosing Qdrant-Indexer semantic search over grep or file reads when exploring code, debugging or asking where and why questions.

MITAuto-check passedAgent Workflows

Install MCP Code Search Tool Selection

skills CLI
$ npx skills add Context-Engine-AI/Context-Engine --skill mcp-tool-selection -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Context-Engine-AI/Context-Engine mcp-tool-selection --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Context-Engine-AI/Context-Engine.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.skills/mcp-tool-selection .claude/skills/mcp-tool-selection && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
mcp-tool-selection
GitHub stars
402
Token cost
~1.3k tokens
SKILL.md length
504 words
Files
1
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

Rules for choosing Qdrant-Indexer semantic search over grep or file reads when exploring code, debugging or asking where and why questions.

  • Starting to explore an unfamiliar repository
  • SKILL.md covers STOP — Do NOT Use Read File or…, Use MCP Qdrant-Indexer When, Use Literal Search/File-Open… and Grep Anti-Patterns (DON'T), plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Answering where or why questions about how code behaves

What it does

This skill sets a default for how the agent explores a codebase when the Context-Engine MCP server is connected: start with its Qdrant-based semantic search and keep grep and file reads for exact literals. It names the search tool as the default entry point, since that tool detects the intent of a query and routes it to a more specific tool.

Conceptual questions, unfamiliar symbols, cross-file relationships and the hunt for callers, definitions or importers go to MCP tools such as repo_search, context_answer, symbol_graph and search_callers_for. Grep stays for a known error class, function name or environment variable. A list of anti-patterns shows broad greps, for example for auth or cache, rewritten as natural-language queries.

When your agent uses it

  • Starting to explore an unfamiliar repository
  • Answering where or why questions about how code behaves
  • Finding callers or importers of a symbol across files
  • Debugging when you do not yet know the exact string to search for

Example prompts

  • “Where is request authentication handled in this codebase?”
  • “Who calls the retry helper, and from which modules?”
  • “Why does the cache get cleared when a user logs out?”
  • “Find every place REDIS_HOST is read.”

Requirements

  • The Context-Engine Qdrant-Indexer MCP server connected to the agent

What it can do on your machine

Read from SKILL.md and the folder at commit 79df190. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are bash).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

MCP Code Search Tool Selection loads about 1.3k tokens when it runs. Until then it costs about 53 tokens; SKILL.md has 504 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~53
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Context-Engine-AI/Context-Engine at commit 79df190, republished under its MIT licence (© Context-Engine-AI). 504 words, ~1,273 tokens.

Download SKILL.mdSave it as .claude/skills/mcp-tool-selection/SKILL.md (or your agent's skills folder).
name
mcp-tool-selection
description
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.

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 repo_search or context_answer
  • About to grep for a symbol? → use search or symbol_graph or search_callers_for
  • About to grep -r for a concept? → use search with natural language
  • About to find/ls for project structure? → use qdrant_status (with list_all=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)

bash
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)

bash
grep -rn "UserAlreadyExists" .      # Specific error class
grep -rn "def authenticate_user" .  # Exact function name
grep -rn "REDIS_HOST" .             # Exact environment variable
Show full SKILL.md (266 more words)Show less

Quick Decision Heuristic

Question TypeTool
UNSURE / GENERAL QUERYMCP search — RECOMMENDED DEFAULT, auto-routes to best tool
"Where is X implemented?"MCP search or repo_search
"Search across multiple repos"MCP cross_repo_search — PRIMARY for multi-repo, prefer over manual chains
"Trace frontend→backend flow"MCP cross_repo_search(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 symbol_graph (query_type="callees")
"Where is X defined?"MCP symbol_graph (query_type="definition")
"What imports X?"MCP symbol_graph (query_type="importers")
"Callers of callers? Multi-hop?"MCP symbol_graph (depth=2+) or graph_query
"What breaks if I change X?"MCP graph_query (impact analysis, transitive callers)
"Circular dependencies?"MCP graph_query (query_type="cycles")
"N independent searches at once?"batch_search (~75% token savings)
"N symbol queries at once?"batch_symbol_graph (~75% token savings)
"N graph queries at once?"batch_graph_query (~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?"search_commits_for + change_history_for_path

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

Batch tools (batch_search, batch_symbol_graph, batch_graph_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.

cross_repo_search 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)

© Context-Engine-AI, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .skills/mcp-tool-selection of Context-Engine-AI/Context-Engine.

Open the folder on GitHubat commit 79df190

Compare with similar skills

MCP Code Search Tool Selection next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

MCP Code Search Tool Selection compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
MCP Code Search Tool Selection this skillContext-Engine-AI/Context-Engine402—~1.3kAutomated safety check: PassMIT
Entroly Context Controljuyterman1000/entroly472—~501Automated safety check: PassApache-2.0
Codebase SearchHelweg/open-codebase-index216—~1.3kAutomated safety check: PassMIT
Codebase Search WorkflowHelweg/open-codebase-index216—~822Automated safety check: PassMIT
Basemind Index ScanGoldziher/basemind106—~997Automated safety check: WarnMIT
Context Mode Output Sandboxmksglu/context-mode26k—~4.1kAutomated safety check: PassCustom licence

Similar skills

  • Entroly Context Control

    juyterman1000/entroly

    Surgically select, compress, and recover codebase context using Entroly's MCP tools.

    472 GitHub stars~501 tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Codebase Search

    Helweg/open-codebase-index

    Chooses the right retrieval tool for code questions: compact context for unfamiliar repos, direct lookup for known symbols, call graphs for relationships and grep for exhaustive matches.

    216 GitHub stars~1.3k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Codebase Search Workflow

    Helweg/open-codebase-index

    Directs an agent to use a local codebase index for repository orientation, definition lookups, call graphs and semantic search before turning to web lookups.

    216 GitHub stars~822 tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Basemind Index Scan

    Goldziher/basemind

    Builds or refreshes the basemind code index from the command line, for when basemind reports no index or its MCP server is not running.

    106 GitHub stars~997 tokensUpdated yesterday
    Agent WorkflowsAuto-check: warnings
  • Context Mode Output Sandbox

    mksglu/context-mode

    Routes large command, file, API and browser output through context-mode tools so only the needed result enters the agent's context, instead of dumping it via Bash.

    26k GitHub stars~4.1k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Skill Seekers Builder

    yusufkaraaslan/Skill_Seekers

    Detects the type of a knowledge source and uses the Skill Seekers MCP tools to turn docs, repos, PDFs or videos into packaged AI skills.

    15k GitHub stars~760 tokensUpdated 6 days ago
    Agent WorkflowsAuto-check passed

More from Context-Engine-AI/Context-Engine

  • Context-Engine Code Search

    Context-Engine-AI/Context-Engine

    Searches a codebase with hybrid semantic and lexical retrieval plus neural reranking through MCP tools, for finding implementations and grounded answers.

    402 GitHub stars~14k tokensUpdated 3 mo ago
    Auto-check passed

Questions about MCP Code Search Tool Selection

What does MCP Code Search Tool Selection do?

Rules for choosing Qdrant-Indexer semantic search over grep or file reads when exploring code, debugging or asking where and why questions. This skill sets a default for how the agent explores a codebase when the Context-Engine MCP server is connected: start with its Qdrant-based semantic search and keep grep and file reads for exact literals. It names the search tool as the default entry point, since that tool detects the intent of a query and routes it to a more specific tool.

When should I use MCP Code Search Tool Selection?

MCP Code Search Tool Selection fits situations like: starting to explore an unfamiliar repository; answering where or why questions about how code behaves; finding callers or importers of a symbol across files; debugging when you do not yet know the exact string to search for.

How do I install MCP Code Search Tool Selection in Claude Code?

Run `npx skills add Context-Engine-AI/Context-Engine --skill mcp-tool-selection -a claude-code`. Or copy the skill folder (.skills/mcp-tool-selection in Context-Engine-AI/Context-Engine) into .claude/skills/mcp-tool-selection in your project. Claude Code loads it when a task matches its description.

How do I install MCP Code Search Tool Selection in Codex?

Run `npx skills add Context-Engine-AI/Context-Engine --skill mcp-tool-selection -a codex`. Or copy the skill folder (.skills/mcp-tool-selection in Context-Engine-AI/Context-Engine) into .agents/skills/mcp-tool-selection in your project. Codex loads it when a task matches its description.

Can I use MCP Code Search Tool Selection in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Context-Engine-AI/Context-Engine --skill mcp-tool-selection -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mcp-tool-selection, .gemini/skills/mcp-tool-selection, .github/skills/mcp-tool-selection and .opencode/skills/mcp-tool-selection in your project.

What does MCP Code Search Tool Selection need to run?

SKILL.md names no scripts, command-line tools or credentials: MCP Code Search Tool Selection is instructions for the agent only. Our summary lists: The Context-Engine Qdrant-Indexer MCP server connected to the agent.

Does MCP Code Search Tool Selection access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is MCP Code Search Tool Selection safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does MCP Code Search Tool Selection use?

MCP Code Search Tool Selection is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does MCP Code Search Tool Selection use?

About 1.3k tokens (SKILL.md is roughly 5.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to MCP Code Search Tool Selection?

Skills that share tags, products or a category with MCP Code Search Tool Selection: Entroly Context Control (juyterman1000/entroly, 472 stars), Codebase Search (Helweg/open-codebase-index, 216 stars), Codebase Search Workflow (Helweg/open-codebase-index, 216 stars) and Basemind Index Scan (Goldziher/basemind, 106 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains MCP Code Search Tool Selection?

Context-Engine-AI (a GitHub organization) maintains it in Context-Engine-AI/Context-Engine, which has 402 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on July 8, 2026.

Source: Context-Engine-AI/Context-Engine on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.