mcp-intelligence-context
MCP Intelligence Context
Ein Repository-Intelligence-MCP-Server, der die Dateien, Symbole, Importe und den Abhängigkeitsgraphen einer Codebasis indexiert und Copilot/Agenten ein kleines, fokussiertes Kontextpaket bereitstellt, anstatt sie das gesamte Repository durchsuchen zu lassen.
Warum
Wenn ein Agent eine mehrdeutige Frage zu einem großen Repo erhält, muss er oft wiederholt Verzeichnisse auflisten, irrelevante Dateien öffnen und die Struktur neu ableiten, bevor er den relevanten Code findet – das verbrennt Tokens und Zeit. Dieses Projekt baut einen persistenten, inkrementell aktualisierten Index des Repos (Dateien, Symbole, Importe, reverse Abhängigkeiten) auf und stellt MCP-Tools bereit, die nur den für eine Abfrage relevanten Kontext mit einem ungefähren Token-Budget zurückgeben.
Related MCP server: lens
So funktioniert es
index_repositorydurchläuft das Repo (unter Beachtung von.gitignore), parst Python-Dateien (überast) und JS/TS-Dateien (über leichte Regex-Heuristiken) auf Funktionen/Klassen/Methoden/Importe/Exporte und baut einen Graphen der reverse Abhängigkeiten auf. Der Index wird unter.mcp_intel_cache/index.jsonzwischengespeichert und inkrementell aktualisiert (nur geänderte Dateien werden neu geparst, basierend auf mtime/Größe).search_code/get_relevant_contextbewerten Dateien nach Symbolname, Dateiname, Docstring/Zusammenfassung und Import-Treffern (lexikalische/Symbolsuche – keine Embeddings in diesem MVP) und geben ein token-budgetiertes Kontextpaket zurück: Symboltabellen + kleine Code-Auszüge, nicht ganze Dateien.get_relevant_contextmeldet außerdem einentoken_savings-Vergleich gegenüber einer naiven Voll-Repo-Scan-Baseline, sodass die Einsparungen in der eigenen Antwort des Tools sichtbar sind.get_file_summary/get_dependenciesermöglichen einem Agenten, in die Symbole einer bestimmten Datei oder deren Auswirkungsbereich (Importeure/Importe) einzutauchen, ohne die gesamte Datei zu lesen.Tools melden eine Veraltungswarnung, wenn der zwischengespeicherte Index älter als 5 Minuten ist und kein Live-Watcher aktiv ist. In der Praxis startet der erste Tool-Aufruf für ein Repo einen Hintergrund-Datei-Watcher (über
watchdog), der Erstellungs-/Änderungs-/Lösch-Ereignisse sofort auf den In-Memory-Index anwendet, sodass der Index kontinuierlich aktuell bleibt, während sich der Code ändert – kein manuelles Reindexieren während einer Sitzung erforderlich. Der On-Disk-Cache wird mit einem Debounce (~2s) geleert, sodass schnelles Speichern nicht zu einem Schreibvorgang pro Tastendruck führt.
Repository-Struktur
src/mcp_intelligence_context/ Python MCP server package
walker.py gitignore-aware file walker
parsers/ Python (ast) and JS/TS (regex) symbol extraction
indexer.py builds/caches the RepoIndex, resolves imports
watcher.py background file watcher that keeps the index live
search.py lexical/symbol search + reverse-dep lookups
context_builder.py token-budgeted context package assembly
server.py MCP tool definitions (stdio server)
vscode-extension/ VS Code extension wrapper (setup/reindex/status commands)
scripts/ one-command bootstrap for new usersSchnellstart (Neue Benutzer)
Wenn Sie neu bei MCP sind und dies schnell in VS Code zum Laufen bringen möchten:
git clone https://github.com/LeoChimal09/MCP-INTELLIGENCE-CONTEXT.git
cd MCP-INTELLIGENCE-CONTEXT
bash scripts/setup_mcp_workspace.shWas dieses Skript tut:
Installiert (oder aktualisiert)
mcp-intelligence-contextmitpipx.Schreibt
.vscode/mcp.jsonfür diesen Workspace.Beschränkt die Indexierung auf den aktuellen Workspace-Ordner, indem
MCP_INTEL_ALLOWED_ROOTS=${workspaceFolder}gesetzt wird.
Dann in VS Code:
Befehlspalette ->
MCP: List Servers.Starten/Neustarten von
mcp-intelligence-context.Im Copilot-Chat-Tool-Auswähler
mcp-intelligence-contextaktivieren.
Wenn das Skript meldet, dass pipx fehlt, installieren Sie es einmal:
brew install pipx
pipx ensurepathDen MCP-Server eigenständig ausführen
python3 -m venv .venv
.venv/bin/pip install -e .
.venv/bin/mcp-intelligence-context # or: python -m mcp_intelligence_context.serverWeisen Sie das zu indexierende Repo zu, indem Sie MCP_INTEL_REPO_ROOT setzen, oder übergeben Sie repo_root explizit an einen beliebigen Tool-Aufruf (Standard ist das aktuelle Arbeitsverzeichnis des Servers).
Installation ohne Klonen dieses Repos
Andere Benutzer benötigen keinen lokalen Checkout – installieren Sie direkt aus dem Git-Repository (oder von PyPI, sobald es dort veröffentlicht ist):
python3 -m venv .venv
.venv/bin/pip install "git+https://github.com/LeoChimal09/MCP-INTELLIGENCE-CONTEXT.git"
# once published: .venv/bin/pip install mcp-intelligence-contextDas Konsolenskript mcp-intelligence-context und die Umgebungsvariable MCP_INTEL_REPO_ROOT funktionieren in beiden Fällen genau gleich – nur die Quelle für pip install unterscheidet sich.
Bei einem MCP-Client registrieren (z. B. VS Code)
Fügen Sie im Ziel-Workspace zu .vscode/mcp.json hinzu:
{
"servers": {
"mcp-intelligence-context": {
"type": "stdio",
"command": "/absolute/path/to/.venv/bin/python",
"args": ["-m", "mcp_intelligence_context.server"],
"env": { "MCP_INTEL_REPO_ROOT": "${workspaceFolder}" }
}
}
}VS-Code-Erweiterung
vscode-extension/ bündelt einen dünnen Wrapper mit drei Befehlen:
MCP Intelligence: Setup Server – erstellt eine venv und installiert das Python-Paket, schreibt dann den obigen
.vscode/mcp.json-Eintrag.MCP Intelligence: Reindex Repository – erzwingt eine Neu-Indexierung des geöffneten Workspace.
MCP Intelligence: Show Status – gibt die Dateianzahl, den Git-Commit und das Alter des zwischengespeicherten Index aus.
Standardmäßig installiert "Setup Server" das Paket aus dem Git-Repository dieses Projekts in eine venv unter dem privaten Speicher der Erweiterung – kein lokaler Klon erforderlich. Zwei Einstellungen steuern dies:
mcpIntelligenceContext.serverPath– auf einen lokalen bearbeitbaren Checkout zeigen (für die Entwicklung an diesem Monorepo); andernfalls leer lassen.mcpIntelligenceContext.pythonPackageSource– das pip-Installationsziel überschreiben (z. B. ein PyPI-Paketname), wennserverPathleer ist.
Zum Erstellen:
cd vscode-extension
npm install
npm run compileDann drücken Sie F5 in VS Code (mit geöffnetem vscode-extension/), um einen Extension Development Host zu starten.
Verfügbare MCP-Tools
Tool | Zweck |
| Index für eine Repo-Wurzel erstellen/aktualisieren |
| Top-Level-Verzeichnisse, Sprachverteilung, Kernmodule |
| Rangfolge der Datei-/Symboltreffer für eine Abfrage |
| Symboltabelle, Importe, Exporte für eine Datei |
| Was eine Datei importiert und wer sie importiert |
| Token-budgetiertes Kontextpaket für eine Abfrage, plus eine |
Bewerten, ob dies tatsächlich hilft
eval/ enthält einen kleinen, ehrlichen Benchmark gegen den eigenen Code dieses Repos (keine LLM-Aufrufe, keine erfundenen Zahlen): 10 handgeschriebene Abfragen mit bekannten Ground-Truth-Dateien, die unser indexiertes Tool mit einer naiven Baseline vergleichen (Baum auflisten, grep, passende ganze Dateien lesen).
.venv/bin/python eval/run_eval.pyEs berichtet hit@1/hit@3 (zeigt das Top-Ergebnis auf die richtige Datei), durchschnittliche Token-Reduktion und Latenz. Dies misst nur die Abruf-/Token-Mechanik – es misst nicht, ob eine echte Copilot-Antwort tatsächlich besser ist, da dafür Live-Modellaufrufe erforderlich sind.
Aktuelle Einschränkungen (MVP)
JS/TS-Parsing basiert auf Regex (kein vollständiger AST), daher kann ungewöhnliche Syntax übersehen werden. Python-Parsing verwendet das Standardmodul
astund ist exakt.Die Suche ist nur lexikalisch/symbolbasiert (mit Stoppwort-Filterung und akkumulierter Multi-Signal-Bewertung); noch keine Embeddings/semantische Suche.
Der Datei-Watcher wendet Änderungen pro Datei an, durchläuft aber
.gitignore-Änderungen selbst nicht zur Laufzeit erneut – wenn.gitignorebearbeitet wird, führen Sieindex_repositoryeinmal mitrefresh=trueaus, um die neuen Regeln zu übernehmen.
Sicherheitsüberlegungen vor breiterer/Produktionsnutzung
Bereits behoben:
Shell-Injection – die VS-Code-Erweiterung interpolierte zuvor Workspace-Einstellungen in Shell-Befehlszeichenfolgen; sie verwendet jetzt
execFilemit Argument-Arrays (keine Shell) und weigert sich, "Setup Server" in nicht vertrauenswürdigen Workspaces auszuführen.Symlink-Escape – der Walker überspringt Symlinks, die außerhalb der Repo-Wurzel auflösen (blockiert einen platzierten Symlink, der Dateien wie
/etc/passwdoffenlegt).Geheimnis-Leckage – Dateinamen, die gängigen Anmeldeinformationsmustern entsprechen (
.env,*.pem,id_rsa,credentials.jsonusw., sieheSENSITIVE_FILENAME_PATTERNSinconfig.py), werden übersprungen, auch wenn sie nicht gitignored sind, sodass ihre Inhalte nicht in Tool-Ausgaben gelangen können.Absturz durch beschädigten Cache – eine fehlerhafte/manipulierte
.mcp_intel_cache/index.jsonlöst jetzt einen sauberen Neuaufbau aus, anstatt den Server beim Start zum Absturz zu bringen.ReDoS – der JS/TS-Regex-Parser überspringt pathologisch lange einzelne Zeilen (minifizierte Dateien), um katastrophales Backtracking-DoS zu vermeiden.
Uneingeschränktes
repo_root– setzen SieMCP_INTEL_ALLOWED_ROOTS(eine:-getrennte Liste absoluter Pfade), um einzuschränken, welche Verzeichnisse der Server indexieren darf; standardmäßig nicht gesetzt, um das heutige flexible Einzelbenutzerverhalten zu erhalten.
Noch architektonisch, nicht vollständig gelöst – vor der Bereitstellung über einen einzelnen lokalen Benutzer hinaus lesen:
Nicht sicher als gemeinsamer/Multi-Tenant-Netzwerkdienst. Dies ist als lokaler, ein-Prozess-pro-Benutzer- stdio-Server konzipiert. Die In-Memory-Index-/Watcher-Caches haben keine Benutzerisolierung oder Authentifizierung. Setzen Sie dies nicht als gemeinsamen HTTP/SSE-Endpunkt aus, ohne pro Aufrufer Sandboxing und Authentifizierung hinzuzufügen.
Abhängigkeiten sind nicht gepinnt (nur
>=) – pinnen Sie exakte Versionen oder verwenden Sie eine Lock-Datei für reproduzierbare, geprüfte Produktionsinstallationen (das hat uns bereits einmal mit einer brechenden API-Änderung vonmcp1.x → 2.0 gebissen).Noch keine automatisierten Regressionstests für diese Codebasis selbst – Änderungen werden derzeit über das manuelle
eval/-Harness und Ad-hoc-Läufe verifiziert, nicht über eine CI-gesteuerte Testsuite.
Available Tools
6 toolsget_dependenciesA
Return what a file imports and which files import it (reverse deps), to understand blast radius before changing a file.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| repo_root | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden. It states the operation is read-only ('return what a file imports...'), which is helpful, but it doesn't disclose whether the tool scans the whole repo, handles dynamic imports, or has performance implications. Given the lack of annotations, a 3 is appropriate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences with no fluff. The main purpose is stated first, and the use case is added compactly. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 2 params and no output schema, the description covers the primary use case, but it lacks details on repo_root semantics, return format, and any edge cases (like missing files). The complexity is moderate, so this is incomplete but not severely.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, and the description does not explain either parameter. The path parameter is obvious from the tool name, but repo_root is undocumented. With no parameter info, a lower score might be expected, but the description's mention of 'file' implies path usage; still, the gap is significant.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool returns a file's imports and reverse dependencies, with a specific purpose (understanding blast radius). It distinguishes itself from siblings like search_code and get_file_summary by focusing on dependency relationships.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage ('to understand blast radius before changing a file') but does not explicitly state when not to use it or mention alternatives like get_relevant_context for broader context. The context signals show siblings, but no explicit routing guidance is given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_file_summaryB
Return the symbol table (functions/classes/methods with signatures and docstrings), imports, and exports for a single indexed file — without returning the entire file body.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| repo_root | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full behavioral burden. It discloses the main output content (symbol table, imports, exports) and a notable exclusion (not returning file body). However, it does not mention prerequisites like requiring the file to already be indexed or what happens when the file is missing.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single well-structured sentence with no filler. It front-loads the core action and contents, then adds the clarifying exclusion. Every part contributes to understanding the tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, no annotations, and zero parameter documentation, the description alone is not enough for an agent to confidently invoke this tool. It explains what is returned but not parameter semantics, indexing prerequisites, or error behavior, leaving important gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 0% description coverage and the description does not explain 'path' or 'repo_root' semantics. While 'single indexed file' loosely ties 'path' to a file location, 'repo_root' remains unexplained, and no format, relative/absolute path guidance, or repository boundary details are provided.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Return') and names a concrete resource ('symbol table... imports, and exports') for a single indexed file. It clearly conveys what the tool does and even specifies what it doesn't do ('without returning the entire file body'), though it doesn't explicitly distinguish itself from siblings like get_relevant_context or get_repo_overview.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'for a single indexed file' implies the tool is for per-file summaries, but there is no explicit guidance on when to prefer this over search_code, get_dependencies, or get_relevant_context. No exclusions or alternatives are mentioned, so usage context is only implied.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_relevant_contextA
Build a focused, token-budgeted context package (symbol tables + small code excerpts) for the files most relevant to a query. This is the main entry point for "help me find/fix X" style requests — use it instead of reading whole files or globbing the repo.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| repo_root | No | ||
| token_budget | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description risks the full burden of behavioral disclosure. It communicates that the tool returns a synthesized context package rather than raw files, and that it is token-limited, but it does not state whether it is strictly read-only, whether it depends on an existing repository index, or what the actual response format looks like.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured. The first sentence states the core action and output, and the second provides routing guidance. There is no filler or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description gives enough to orient an agent to the main purpose and broad usage, but it leaves gaps around the return structure, required prior state (e.g., indexation), and parameter behaviors. Because there is no output schema, more detail about the package shape would help.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description does not explain the three parameters. 'query' and 'token-budgeted' are lightly implied, but repo_root is entirely undocumented, meaning an agent cannot infer the expected input format or behavior for that parameter without external knowledge.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool builds a focused, token-budgeted context package of symbol tables and code excerpts for relevant files. It distinguishes itself as the 'main entry point' for find/fix requests, which differentiates it from lower-level or broader repository tools, though it does not explicitly name all sibling tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly says to use this tool for 'help me find/fix X' requests and to use it instead of reading whole files or globbing the repository. This provides a clear when and when-not, but it does not name specific alternative tools such as search_code or get_file_summary.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_repo_overviewA
Return a high-level architecture summary: top-level directories, language breakdown, and the files with the most symbols (likely core modules). Use this to orient before drilling into specific files.
| Name | Required | Description | Default |
|---|---|---|---|
| repo_root | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses the read-only nature by saying 'Return' and describes the output shape, but it does not mention potential prerequisites, performance implications, or what happens when repo_root is null. This is adequate but incomplete.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two tight sentences with no filler. The first sentence front-loads the core behavior and output content; the second gives the usage context. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read-only tool with one optional parameter and no output schema, the description covers the main purpose and output well. However, the undefined parameter behavior and the relationship to index_repository leave enough ambiguity that an agent may not know how to invoke it correctly on first use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has 0% description coverage for repo_root, and the tool description does not mention the parameter at all. The agent is left to infer that repo_root is the repository path and that null may mean the current directory, which the description does not clarify.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states exactly what the tool returns: a high-level architecture summary with top-level directories, language breakdown, and files with the most symbols. This clearly distinguishes it from sibling file-level tools like get_file_summary and search_code.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly says to use this to 'orient before drilling into specific files,' which gives a clear when-to-use context. It does not name alternatives or state when not to use it, but the orientation purpose is specific enough.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
index_repositoryA
Index (or re-index) a repository: extracts files, symbols, imports and a reverse dependency graph. Call this first, and again with refresh=true after significant file changes. Uses an on-disk cache for fast re-runs.
| Name | Required | Description | Default |
|---|---|---|---|
| refresh | No | ||
| repo_root | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavior disclosure, and it does reasonably well: it declares persistence behavior ('on-disk cache for fast re-runs'), signals re-indexing with refresh=true, and describes the data that is extracted. It stops at details like what the tool returns or whether it is non-destructive, but the core behavioral traits are covered.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences, no filler: the first defines what it does, the second gives the call-order rule applied, and the third explains caching. Important behavioral information is front-loaded, and every clause adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given a simple two-parameter schema with no output schema and no annotations, the description is close to complete: it asserts when to call it for the first time, when to re-run with refresh, what the internal behavior is (dependency graph building and caching), and what gets updated. It could specify what happens after indexing or what success looks like, but it is complete enough for this kind of setup tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It does explain refresh past the schema by tying it to re-running after file changes. However, repo_root is never mentioned or defined; an agent can infer it is the repository path, but the uncertainty is left to guesswork. Since at least one parameter is semantically enriched and the other is left implicit, this is adequate but not strong.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific action and resource: 'index (or re-index) a repository' and enumerates what it extracts — files, symbols, imports, and a reverse dependency graph. It reads as an explicit foundation step, and the siblings (get_repo_overview, search_code, get_dependencies) are clearly different read/query tools rather than indexing tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description says 'Call this first, and again with refresh=true after significant file changes.' This is direct when-to-use guidance, making the invocation very and rerun conditions clear. It does not explicitly contrast with the sibling tools, but the relationship is strongly implied: this is the preliminary indexing step before querying with the get_* siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_codeA
Search the indexed repository for files/symbols relevant to a natural language or keyword query (e.g. "authentication middleware", "parseConfig"). Returns ranked file hits with the matching symbol/reason — much cheaper than scanning the whole repo.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| top_k | No | ||
| repo_root | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden of behavioral disclosure. It does reveal the main output behavior—ranked file hits with matching symbol/reason—and the cost advantage. However, it does not mention whether the repository must already be indexed, how repo_root is scoped, or any failure/edge behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact and front-loaded: it states the action, example usage, return behavior, and cost benefit in two efficient sentences. There is no fluff or redundant restatement of the tool name.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
This is a fairly simple tool and the description covers the core purpose and return shape adequately. Still, it leaves important invocation details undocumented, especially the semantics of top_k and repo_root, plus the implied prerequisite that the repository must be indexed first.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds useful meaning for the query parameter with natural-language/keyword guidance and examples, but top_k and repo_root are not explained at all. Since schema description coverage is 0%, the description was expected to compensate for all parameters but only covers one meaningfully.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool searches the indexed repository for files/symbols matching a natural language or keyword query and returns ranked file hits with matching symbols/reasons. It is specific about the resource and output, though it does not explicitly distinguish it from siblings like get_relevant_context.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives clear context for when to use the tool: to find relevant files/symbols via semantic or keyword search. It also notes the tool is much cheaper than scanning the whole repo, which is useful guidance, though no explicit when-not-to-use or alternative routing is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
6 tool updates
v0.1.0- First observed
get_dependencies - First observed
get_file_summary - First observed
get_relevant_context - First observed
get_repo_overview - First observed
index_repository - First observed
search_code
TDQS
Scored across 6 tools
Each tool has a largely distinct purpose (index, overview, search, file details, dependencies, context), and the descriptive text flags get_relevant_context as the main entry point. However, search_code and get_relevant_context could both serve as the starting point for a 'find X' request, creating minor selection ambiguity.
All tools follow a consistent verb_noun snake_case pattern (index_, get_, search_), making the API predictable and scannable. The only minor nitpick is abbreviating 'repository' as 'repo' in get_repo_overview, but this does not affect the overall pattern.
Six tools sit at the sweet spot for a code-intelligence server, each earning its place in the index-query workflow. The set covers setup, orientation, discovery, drill-down, and impact analysis without bloat.
The core indexing-to-context pipeline is well covered, including re-indexing via refresh and reverse-dependency analysis for safe edits. Minor gaps exist (no full-file body reader, no way to list indexed repositories or explicitly purge the cache), but these seem like intentional scope decisions for a token-budget-focused tool.
Maintenance
Related MCP Connectors
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Search indexed code, trace dependencies, assess change impact, and recall repository memory.
Codebase intelligence for AI agents — dead code, blast radius, ownership.
Related MCP Servers
AlicenseNot gradedqualityDmaintenanceProvides AI coding agents with structured access to indexed codebases via semantic search, symbol analysis, and file reading tools.13Server Side Public , v 1- AlicenseNot gradedqualityCmaintenanceProvides token-efficient code retrieval for coding agents by indexing repositories and enabling ranked snippet search, symbol outlines, and surgical line reads.7 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables LLM agents to efficiently understand and navigate a codebase by providing semantic search over symbols and a reference graph, replacing expensive grep/glob calls with structured tools like definition lookup, caller/callee queries, and change-impact analysis.3MIT
- FlicenseNot gradedqualityBmaintenanceProvides efficient code navigation and graph-based analysis for AI agents, enabling symbol resolution, callers, implementations, and type schemas with minimal token usage.-