hybrid_search
Find relevant code by blending semantic vector search with knowledge graph proximity, returning ranked code chunks instead of entire files.
Instructions
Semantic vector search re-ranked by knowledge graph proximity.
Combines vector similarity (cosine) with structural graph proximity
(BFS distance from query-matched graph nodes). The final score is:
score = alpha * vector_score + (1 - alpha) * graph_score
Both vector and graph scores are normalised to [0, 1] before blending.
Requires both index_codebase and index_graph to have been run.
Args:
query: Natural language description of what you're looking for.
path: Absolute path to the codebase root directory.
top_k: Number of results to return (default 8, max 20).
alpha: Weight of vector score vs graph score (0.0 = graph only,
1.0 = vector only, default 0.6).
min_score: Minimum blended score threshold (default 0.0).
Returns:
Formatted list of code chunks ranked by blended score.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>",
"path": "<path>"
},
"name": "hybrid_search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| alpha | No | ||
| query | Yes | ||
| top_k | No | ||
| min_score | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |