semantic-code-intelligence
Semantische Code-Intelligenz
Lokale semantische Suche und zitierte Code-Durchläufe für Software-Repositories.
Semantic Code Intelligence parst ein Repository in symbolbewusste Chunks, indexiert diese Chunks mit FAISS und BM25, fusioniert beide Ergebnismengen und bewertet die stärksten Kandidaten mit einem Cross-Encoder neu. Die Ergebnisse enthalten exakte Dateipfade und Zeilenbereiche. Alles läuft lokal; kein Cloud-API-Schlüssel erforderlich.
Was es bietet
Hybride semantische und lexikalische Codesuche
Exakte Symbol-, Pfad- und Kontextbegriffs-Boostings
Zuverlässigkeitskennzeichnungen der Suche basierend auf Retrieval-Übereinstimmung
Python-AST-Parsing und strukturelles Parsing für gängige Programmiersprachen
Exakte Zitate wie
src/auth.py:L42-L67Browser-Dashboard und REST-API
CLI-, MCP- und LSP-Schnittstellen
Lokale, von Ollama unterstützte Code-Durchläufe mit deterministischem Evidenz-Fallback
FAISS-, BM25- und SQLite-Index-Persistenz
Inkrementelle Dateisystemüberwachung
Symbol- und Abhängigkeitsgraphen
Reproduzierbare Indexierungs- und Retrieval-Benchmarks
Related MCP server: codebase-analyser
Anforderungen
macOS oder Linux
Python 3.10 oder neuer
Git
Ungefähr 2–4 GB freier Speicherplatz für Python-Abhängigkeiten und lokale Modell-Caches
Optional: uv für schnellere Umgebungsverwaltung
Optional: Ollama für generierte Code-Durchläufe
Die ersten Indexierungs- und Reranking-Vorgänge erfordern Internetzugriff, um Hugging-Face-Modellgewichte herunterzuladen. Nachdem die Modelle zwischengespeichert sind, funktioniert das Retrieval offline.
Schnellstart auf einem sauberen Rechner
1. Repository klonen
git clone https://github.com/saitarrun/Semantic-code-intelligence.git
cd semantic-code-intelligence2. Umgebung erstellen und Anwendung installieren
Mit uv:
uv venv
source .venv/bin/activate
uv pip install -e .Mit Standard-Python-Werkzeugen:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e .Windows ist derzeit kein getestetes Ziel, aber der entsprechende Aktivierungsbefehl lautet .venv\Scripts\activate.
3. Retrieval-Modelle herunterladen und Index erstellen
Modell-Downloads sind standardmäßig absichtlich deaktiviert, damit normale Anwendungsanfragen nie unerwarteten Netzwerkverkehr auslösen. Aktivieren Sie Downloads explizit beim ersten Index und der ersten Abfrage:
export CODE_INTEL_ALLOW_MODEL_DOWNLOADS=1
code-intel index .
code-intel query "Where is HybridRetrievalPipeline implemented?" --citations-only
unset CODE_INTEL_ALLOW_MODEL_DOWNLOADSDies bereitet vor:
sentence-transformers/all-MiniLM-L6-v2für dichte Einbettungencross-encoder/ms-marco-MiniLM-L-6-v2für das Reranking
Der Repository-Index wird in .code_intel_index/ gespeichert. Das Verzeichnis enthält den FAISS-Index, BM25-Daten und SQLite-Metadaten und sollte nicht eingecheckt werden.
4. Webanwendung starten
code-intel serve --host 127.0.0.1 --port 8000Öffnen Sie http://127.0.0.1:8000.
Das Dashboard umfasst:
Semantische Suche
Code-Durchlauf
Abhängigkeitskarte
Diff- und LSP-Werkzeuge
Repository-Auswahl und Neuindizierungssteuerung
Latenz pro Stufe und Retrieval-Zuverlässigkeitsindikatoren
Ein anderes Repository indizieren
Indexdaten werden standardmäßig im Ziel-Repository gespeichert:
code-intel index /absolute/path/to/projectDieses Repository durchsuchen:
code-intel query \
"How are access tokens validated?" \
--dir /absolute/path/to/projectVerwenden Sie ein separates Indexverzeichnis, wenn das Quell-Repository unberührt bleiben soll:
code-intel index /absolute/path/to/project \
--index-dir /absolute/path/to/index-storage
code-intel query \
"Where is the database connection pool created?" \
--dir /absolute/path/to/project \
--index-dir /absolute/path/to/index-storageErzwingen Sie einen sauberen Neuaufbau nach Änderungen am Parser- oder Einbettungsverhalten:
code-intel index /absolute/path/to/project --forceSemantische Suche
Der Hybridmodus wird empfohlen. Er kombiniert Ähnlichkeit in natürlicher Sprache mit exakter Bezeichnerübereinstimmung:
code-intel query "How does the application serve the web UI?"Exakte Symbolsuche:
code-intel query "Where is serve_ui implemented?"Mehr Ergebnisse zurückgeben:
code-intel query "authentication middleware" --top-k 10Zitate anzeigen, ohne Code zu drucken:
code-intel query "database transaction rollback" --citations-onlyEine einzelne Retrieval-Strategie für Diagnosen auswählen:
code-intel query "PaymentProcessor" --mode sparse
code-intel query "logic responsible for charging a customer" --mode dense
code-intel query "charge customer payment" --mode hybridCross-Encoder-Reranking deaktivieren, wenn geringere Latenz wichtiger ist als Präzision:
code-intel query "configuration loader" --no-rerankSo funktioniert das Ranking
Die standardmäßige Hybrid-Pipeline führt diese Schritte aus:
Erweitert häufige Entwicklerabsichten um deterministische Code-Domänenbegriffe.
Ruft bis zu 50 dichte FAISS-Kandidaten ab.
Ruft bis zu 50 lexikalische BM25-Kandidaten ab.
Fusioniert bis zu 60 eindeutige Kandidaten mit Reciprocal Rank Fusion.
Bewertet bis zu 40 Kandidaten mit einem lokalen Cross-Encoder neu.
Verstärkt exakte Symbole, Pfade und kontextuelle Begriffstreffer.
Entfernt doppelte Zitate und begrenzt sich wiederholende Ergebnisse aus derselben Datei.
Gibt ein Zuverlässigkeitslabel mit den zugrunde liegenden Belegen zurück.
Zuverlässigkeit ist kein LLM-Konfidenzwert. Sie berichtet beobachtbare Retrieval-Signale wie dichte/lexikalische Übereinstimmung, exakte Symboltreffer, Pfadüberlappung und semantische Ähnlichkeit.
Code-Durchläufe
Deterministischer Evidenzmodus
Dieser Modus erfordert kein Ollama. Er gibt abgerufene Symbole, Bereiche, Abhängigkeiten, Quellblöcke und Zitate zurück, ohne Verhalten zu erfinden:
code-intel ask \
"How does the indexing pipeline persist metadata?" \
--provider extractiveGenerierte lokale Durchläufe mit Ollama
Installieren und starten Sie Ollama, dann laden Sie das Standardmodell herunter:
ollama pull qwen2.5-coder:7bFühren Sie einen zitierten Durchlauf aus:
code-intel ask "Explain the hybrid retrieval control flow"Verwenden Sie ein anderes lokales Modell oder einen anderen Ollama-Server:
export CODE_INTEL_OLLAMA_MODEL=deepseek-coder-v2:lite
export OLLAMA_BASE_URL=http://127.0.0.1:11434Wenn Ollama nicht erreichbar ist, kennzeichnet die Anwendung die Antwort deutlich als extractive-fallback und gibt deterministische Quellbelege zurück.
Interaktive CLI
Starten Sie eine kontinuierliche Suchsitzung:
code-intel interactive --dir /absolute/path/to/projectIndexstatistiken anzeigen:
code-intel stats --dir /absolute/path/to/projectAlle Befehle anzeigen:
code-intel --help
code-intel query --helpREST-API
Server starten:
code-intel serve --host 127.0.0.1 --port 8000Gesundheitscheck:
curl http://127.0.0.1:8000/api/healthEin Repository indizieren:
curl -X POST http://127.0.0.1:8000/api/index \
-H 'Content-Type: application/json' \
-d '{
"target_dir": "/absolute/path/to/project",
"force": false
}'Hybride Suche ausführen:
curl -X POST http://127.0.0.1:8000/api/search \
-H 'Content-Type: application/json' \
-d '{
"query": "Where is token validation implemented?",
"repo_path": "/absolute/path/to/project",
"top_k": 5,
"mode": "hybrid",
"rerank": true
}'Einen Durchlauf generieren:
curl -X POST http://127.0.0.1:8000/api/synthesize \
-H 'Content-Type: application/json' \
-d '{
"query": "Explain token validation failure paths",
"repo_path": "/absolute/path/to/project",
"top_k": 8,
"provider": "extractive"
}'Wichtige Endpunkte:
Methode | Endpunkt | Zweck |
|
| Dienst- und Indexstatus |
|
| Dateien, Zeilen, Chunks und Indexmanifest |
|
| SSE-Indexierungsfortschritt |
|
| Synchrones Repository-Indexing |
|
| Dichte, spärliche oder hybride Suche |
|
| Zitierte Code-Antwort |
|
| Gestreamte zitierte Antwort |
|
| Symbol- und Abhängigkeitsgraph |
|
| Inkrementelle Überwachung starten oder stoppen |
|
| Definitionen, Referenzen und Hover-Daten |
|
| Vorgeschlagenen Unified-Diff generieren |
|
| Unified-Diff auf das ausgewählte Repository anwenden |
Binden Sie an 127.0.0.1, sofern kein Remote-Zugriff beabsichtigt ist. Patch- und Dateiöffnungs-Endpunkte arbeiten auf dem lokalen Dateisystem und sollten nicht ungeschützten Netzwerken ausgesetzt werden.
MCP-Integration
Der MCP-Server ermöglicht es VS Code, Cursor, Claude Code und anderen kompatiblen Coding-Agenten, die indizierte Codebasis zu durchsuchen und exakte Quellbereiche abzurufen. Installieren und indizieren Sie das Projekt zuerst:
git clone https://github.com/saitarrun/Semantic-code-intelligence.git
cd Semantic-code-intelligence
python -m venv .venv
source .venv/bin/activate
pip install -e .
code-intel index --dir /absolute/path/to/your/projectVerwenden Sie den absoluten ausführbaren Pfad, der von which code-intel ausgegeben wird, in den folgenden Beispielen.
VS Code
Erstellen Sie .vscode/mcp.json in dem Projekt, das der Agent durchsuchen soll:
{
"servers": {
"semanticCodeIntelligence": {
"type": "stdio",
"command": "/absolute/path/to/Semantic-code-intelligence/.venv/bin/code-intel",
"args": ["mcp", "--dir", "${workspaceFolder}"],
"cwd": "${workspaceFolder}"
}
}
}Führen Sie MCP: List Servers aus der Befehlspalette aus, starten Sie semanticCodeIntelligence und genehmigen Sie dessen Werkzeuge. Wenn die alte Werkzeugliste zwischengespeichert ist, führen Sie MCP: Reset Cached Tools aus.
Cursor
Erstellen Sie .cursor/mcp.json im Zielprojekt:
{
"mcpServers": {
"semantic-code-intelligence": {
"command": "/absolute/path/to/Semantic-code-intelligence/.venv/bin/code-intel",
"args": ["mcp", "--dir", "${workspaceFolder}"]
}
}
}Claude Code
Registrieren Sie den lokalen stdio-Server aus dem Projekt, das Sie durchsuchen möchten:
claude mcp add --transport stdio --scope project semantic-code-intelligence -- \
/absolute/path/to/Semantic-code-intelligence/.venv/bin/code-intel mcp --dir /absolute/path/to/your/project
claude mcp get semantic-code-intelligenceKonfigurieren Sie für einen anderen MCP-kompatiblen Agenten dieselbe ausführbare Datei als lokalen stdio-Server mit den Argumenten mcp --dir /absoluter/pfad/zu/ihrem/projekt. Der Server schreibt nur JSON-RPC-Nachrichten auf stdout, wie von stdio-Clients gefordert.
Verfügbare MCP-Werkzeuge:
code_intel_search: hybride, dichte oder spärliche Abfrage mit exakten Zeilen und Zuverlässigkeitsmetadatencode_intel_symbol_graph: Abhängigkeits- und Aufrufgraphendaten für ein Repository oder Symbolcode_intel_index: Index aus dem Coding-Agenten erstellen oder aktualisierencode_intel_read_file: sicher bis zu 400 Zeilen innerhalb des konfigurierten Repositorys lesen
Das Zielprojekt muss vor Suchanfragen indiziert sein. Standardmäßig wird sein Index unter <projekt>/.code_intel_index gespeichert; übergeben Sie --index-dir /pfad/zum/index an den MCP-Befehl, wenn Sie ein separates Indexverzeichnis verwenden. Modell-Downloads bleiben optional: Setzen Sie CODE_INTEL_ALLOW_MODEL_DOWNLOADS=1, wenn das Einbettungs- oder Reranking-Modell nicht bereits zwischengespeichert ist.
LSP- und Dateisystem-Watcher
Starten Sie die stdio-LSP-Brücke:
code-intel lsp --dir /absolute/path/to/projectStarten Sie den inkrementellen Watcher:
code-intel watch --dir /absolute/path/to/projectDer Watcher beobachtet unterstützte Quelldateien und aktualisiert den Indexstatus nach Änderungen. Verwenden Sie Ctrl+C, um einen der beiden Prozesse zu stoppen.
Konfiguration
Umgebungsvariablen:
Variable | Standard | Beschreibung |
|
| Auf |
|
| Ollama-Modell für generierte Durchläufe |
|
| Basis-URL der Ollama-API |
| Localhost-Ursprünge | Kommagetrennte Browser-Ursprünge, die von der API erlaubt sind |
|
| Maximale Anzahl von Repository-Pipelines, die von der API zwischengespeichert werden |
Programmatische Konfiguration:
from pathlib import Path
from semantic_code_intel.config import CodeIntelConfig
from semantic_code_intel.indexing.engine import HybridIndexer
from semantic_code_intel.retrieval.pipeline import HybridRetrievalPipeline
project = Path("/absolute/path/to/project")
config = CodeIntelConfig(project_root=project)
config.retrieval.dense_top_k = 75
config.retrieval.sparse_top_k = 75
config.retrieval.final_top_k = 8
HybridIndexer(config).index_codebase(project)
response = HybridRetrievalPipeline(config).query(
"Where is request authentication enforced?",
top_k=8,
)
for result in response.results:
print(result.citation, result.chunk.symbol_name, result.score)
print(response.reliability, response.reliability_reasons)Unterstützte Dateien
Der Standard-Scanner umfasst:
Python
JavaScript und TypeScript
Go
Rust
Java
C und C++
C#
Ruby
PHP
Swift
Kotlin und Scala
Shell-Skripte
SQL
HTML und CSS
JSON, YAML, TOML und Markdown
Gängige generierte Verzeichnisse, virtuelle Umgebungen, Abhängigkeitsordner, Sperrdateien, Binärdateien, minifizierte Assets, .git, .code_intel_index und oss_evaluation sind standardmäßig ausgeschlossen. Siehe ParserConfig in semantic_code_intel/config.py, um Erweiterungen und Ignorier-Muster anzupassen.
Architektur
flowchart LR
A[Repository] --> B[Scanner and ignore rules]
B --> C[Python AST or polyglot parser]
C --> D[Symbol-aware chunks]
D --> E[Local embedding model]
E --> F[(FAISS)]
D --> G[Code-aware tokenizer]
G --> H[(BM25)]
D --> I[(SQLite metadata)]
Q[Query] --> X[Intent expansion]
X --> F
X --> H
F --> R[Reciprocal Rank Fusion]
H --> R
R --> J[Cross-encoder reranker]
J --> K[Exact symbol and path boosts]
K --> L[Diversity and reliability]
L --> M[CLI, API, Web, MCP, LSP]Kernmodule:
Paket | Verantwortung |
| Repository-Scanning und strukturelles Code-Chunking |
| Einbettungen, FAISS, BM25, SQLite und Überwachung |
| Abfrageerweiterung, Fusion, Reranking, Zuverlässigkeit und Zitate |
| Fundierte Prompts, Ollama-Synthese und deterministischer Fallback |
| FastAPI-Endpunkte und Browser-Dashboard |
| Befehlszeilenschnittstellen |
| Symbol- und Abhängigkeitsgraphen |
| Model Context Protocol Server |
| Language Server Protocol Brücke |
| Synthetische Repository-Generierung und Retrieval-Bewertung |
Testen
Führen Sie die vollständige Testsuite aus:
uv run pytest -qOder mit einer aktivierten Umgebung:
pytest -qDie Suite deckt Parser, FAISS, BM25, Abfrageerweiterung, Exakt-Treffer-Boosting, Fusion, Zitate, API-Endpunkte, lokales Syntheseverhalten, MCP, LSP, Patchen, Überwachung und Benchmark-Generierung ab.
Benchmarking
Führen Sie einen reproduzierbaren synthetischen Benchmark aus:
code-intel benchmark \
--workspace ./benchmark_workspace \
--loc 40000 \
--queries 30Der Runner schreibt benchmark_report.json mit:
Datensatz- und Indexgrößen
Indexierungsdurchsatz
Latenz-Perzentile für dichte, spärliche, Reranker- und End-to-End-Abfragen
Trefferquote und mittlerer reziproker Rang
Ausgeführte Abfragedatensätze
Python-, Plattform-, Hardware-, Paket- und Modellmetadaten
Benchmark-Ergebnisse hängen von Hardware, Modell-Cache-Zustand, Repository-Zusammensetzung und Abfragesatz ab. Behandeln Sie historische Zahlen als Messungen, nicht als Garantien.
Fehlerbehebung
Modell ist lokal nicht verfügbar
Führen Sie den fehlgeschlagenen Vorgang einmal mit aktivierten Downloads aus:
CODE_INTEL_ALLOW_MODEL_DOWNLOADS=1 code-intel index /absolute/path/to/project --force
CODE_INTEL_ALLOW_MODEL_DOWNLOADS=1 code-intel query "warm up reranker" --dir /absolute/path/to/projectIndex nicht gefunden
Die für die Abfrage verwendeten --dir- und --index-dir-Werte müssen mit denen der Indizierung übereinstimmen.
code-intel stats --dir /absolute/path/to/projectDurchlauf sagt, Ollama sei nicht verfügbar
Überprüfen Sie den lokalen Server und die installierten Modelle:
ollama list
curl http://127.0.0.1:11434/api/tagsSie können jederzeit den deterministischen Evidenzmodus verwenden:
code-intel ask "your question" --provider extractiveSuchergebnisse sind schwach
Verwenden Sie den genauen Klassen-, Funktions-, Methoden-, Endpunkt- oder Konfigurationsnamen, wenn bekannt.
Bevorzugen Sie den Hybrid-Modus für den normalen Gebrauch.
Erhöhen Sie
--top-k, wenn sich die Antwort über mehrere Dateien erstreckt.Indizieren Sie mit
--forceerneut, nachdem Sie die Parser- oder Embedding-Konfiguration geändert haben.Überprüfen Sie das Zuverlässigkeits-Label; eine geringe Zuverlässigkeit bedeutet, dass die Abrufsignale nicht stark übereinstimmen.
Serverport ist bereits belegt
Wählen Sie einen anderen Port:
code-intel serve --host 127.0.0.1 --port 8010Projektstatus
Dieses Projekt befindet sich in aktiver Entwicklung. Überprüfen Sie generierte Patches, bevor Sie sie anwenden, halten Sie die API für den normalen Gebrauch an localhost gebunden und validieren Sie Benchmark-Behauptungen an Ihren eigenen Ziel-Repositories.
Lizenz
Es wurde noch keine Open-Source-Lizenz hinzugefügt. Der öffentliche Zugriff auf das Repository gewährt für sich genommen keine Erlaubnis, den Code zu kopieren, zu modifizieren oder weiterzuverbreiten.
Available Tools
4 toolscode_intel_indexC
Build or refresh the semantic and lexical indexes for a local repository.
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | ||
| index_dir | No | Optional index storage directory. | |
| repo_path | No | Repository root; defaults to the server --dir. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so the description carries the full behavioral burden. It doesn't disclose cost/duration (indexing can be slow), whether it blocks, whether it overwrites existing indexes, or what happens on failure. 'Refresh' hints at mutation but no depth.
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?
Single clear sentence with verb and scope front-loaded, zero waste.
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 mutation tool with no annotations, no output schema, and an undocumented 'force' parameter, the description is too thin. It leaves the agent guessing about cost, prerequisites, and the effect of force.
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 67%, with index_dir and repo_path already documented in the schema. The 'force' parameter (schema has no description) is undocumented anywhere, and the description doesn't compensate. Baseline 3 given partial coverage.
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 verb ('Build or refresh') and resource ('semantic and lexical indexes for a local repository'). It's distinct from siblings like code_intel_search, though it doesn't explicitly name them.
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?
No guidance on when to run this versus using existing indexes, nor prerequisites like whether search requires prior indexing. Purely descriptive, no when-to-use direction.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
code_intel_read_fileB
Read a bounded line range from a source file inside the configured repository.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Repository-relative or absolute file path. | |
| end_line | No | Inclusive; at most 400 lines are returned. | |
| repo_path | No | Repository root; defaults to the server --dir. | |
| start_line | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden, and it does disclose two useful traits: reads are bounded to a line range and restricted to the configured repository. However, it never states that the operation is read-only/side-effect free, nor how it behaves on a missing file, an out-of-repo absolute path, or a range exceeding the cap.
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?
A single front-loaded sentence with no filler; the core action and its two constraints are stated immediately.
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 four-parameter read tool with no annotations and no output schema, the description is adequate but thin: it omits read-only confirmation, error/edge-case behavior, and any hint of the return shape (raw lines vs numbered lines). An agent can call it, but cannot fully predict its behavior.
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 75%, so the schema already documents path, end_line, and repo_path; only start_line's default relies on the schema's default keyword. The description's 'bounded line range' and 'inside the configured repository' echoes rather than extends the end_line cap and repo_path semantics, so baseline 3 is appropriate.
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 names a specific verb and resource ('Read a bounded line range from a source file') and scopes it to the configured repository, which is enough for an agent to distinguish it from code_intel_search, code_intel_symbol_graph, and code_intel_index. It stops short of explicitly naming which sibling to use when, but the purpose itself is unambiguous.
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?
There is no when-to-use guidance, no prerequisites, and no mention of alternatives such as code_intel_search for locating content versus this tool for reading it. An agent must infer the read-content use case purely from the verb.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
code_intel_searchB
Search indexed code with hybrid semantic and lexical retrieval, exact citations, match reasons, and reliability scoring.
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | hybrid | |
| query | Yes | Question, behavior, or symbol to find. | |
| top_k | No | ||
| rerank | No | ||
| index_dir | No | Optional index storage directory. | |
| repo_path | No | Repository root; defaults to the server --dir. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden, and it does disclose some behavioral traits: hybrid semantic/lexical retrieval, exact citations, match reasons, and reliability scoring. However it omits key operational facts such as whether the index must already exist, which repo/index is targeted by default, and whether results are bounded or truncated.
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?
A single front-loaded sentence with no filler; every clause adds information. It is efficient, though the terse packing of output traits without any usage context borders on under-specification.
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 6-parameter tool with no annotations, no output schema, and half the parameters undocumented, the description is only partially complete. It hints at the return content (citations, match reasons, reliability) but leaves prerequisites and most parameter behavior unaddressed.
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 only 50%, and the description adds no parameter meaning at all – it does not explain mode options (hybrid/dense/sparse), rerank, top_k limits, index_dir, or repo_path defaults. An agent must infer the effect of switching from hybrid to dense/sparse with no help.
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 verb and resource ("Search indexed code") and names the retrieval techniques (hybrid semantic + lexical) plus output traits, so the agent knows this is a code search tool. It does not name or differentiate itself from siblings like code_intel_symbol_graph or code_intel_read_file, so it stops short of a 5.
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?
There is no guidance on when to choose this over code_intel_symbol_graph (symbol relations) or code_intel_read_file (direct reads), nor any preconditions such as needing the repository indexed first. Usage is only weakly implied by the verb "Search".
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
code_intel_symbol_graphC
Return repository dependency/call-graph data, optionally centered on a symbol.
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | No | Optional function, class, or symbol name. | |
| index_dir | No | Optional index storage directory. | |
| repo_path | No | Repository root; defaults to the server --dir. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It does state that symbol centering is optional and that graph data is returned, but says nothing about output format, graph depth/limits, whether an index must exist first (relevant given index_dir), or cost/size of the result.
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?
A single tight sentence with no waste, front-loading the resource (dependency/call-graph data) before the optional scoping. Very brief, which is efficient but leaves little room for behavioral detail.
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 read tool with no annotations and no output schema, the description is minimally adequate. It should mention whether an index is required beforehand and what the returned graph looks like, since an agent has no other source for that.
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 100%, so parameters are already documented. The description only adds that symbol centering is optional, which is already reflected in the schema's 'Optional' prefix; baseline 3 applies when the schema does the heavy lifting.
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 verb (Return) and resources (dependency/call-graph data) with a scoping qualifier (optionally centered on a symbol). Clear enough to distinguish from siblings like code_intel_search or code_intel_read_file, though it doesn't explicitly name alternatives.
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?
No guidance on when to use this tool versus code_intel_search (symbol lookup) or code_intel_index (index building). The optional symbol scoping is implied but no conditions or prerequisites are given.
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.
4 tool updates
v0.1.0- First observed
code_intel_index - First observed
code_intel_read_file - First observed
code_intel_search - First observed
code_intel_symbol_graph
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose: indexing, hybrid search, dependency/call-graph retrieval, and bounded file reading. Although search and read_file both return code, their boundaries are clear from descriptions (retrieval vs direct file access).
All tools share the consistent code_intel_ prefix, which provides a predictable namespace. However, suffixes mix verb forms (search, index) and noun forms (symbol_graph), so the pattern is mostly but not perfectly consistent.
Four tools is well-scoped for a code intelligence server, covering the essential operations of indexing, searching, graph exploration, and reading without redundancy or bloat.
The core lifecycle (index → search → explore graph → read file) is covered, but missing operations such as listing indexed repositories, retrieving symbol definitions, or index management could create minor dead ends for some agent workflows.
Maintenance
Related MCP Connectors
Token-efficient search for coding agents over public and private documentation.
Search indexed code, trace dependencies, assess change impact, and recall repository memory.
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Project memory, semantic code search, and grounded agent context.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI coding assistants to search and retrieve information from a locally ingested knowledge base using hybrid search, grounded in user-curated documentation.16MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI agents and IDEs to ingest and search code repositories using hybrid retrieval (dense + sparse) with exact line-level citations for precise code analysis.1-
- AlicenseAqualityAmaintenanceEnables coding agents to query local notes, decisions, docs, and code with hybrid retrieval (BM25 + embeddings + reranking) and get path:line citations. It provides tools like rag_query for full-corpus search and search_knowledge for project-scoped knowledge recall.21MIT
- AlicenseAqualityBmaintenanceEnables coding agents to search a local, offline archive of past sessions and repository Markdown docs using hybrid lexical and semantic retrieval, and read matching records to ground new work in prior knowledge without external calls.2MIT