search_hybrid_context
Discover code by meaning using hybrid search that combines semantic vectors and graph analysis. Queries natural language descriptions to locate relevant files, signatures, and documentation.
Instructions
Read-only semantic and structural code search combining vector embeddings with graph analysis. Use this for initial codebase discovery to find features by their meaning (e.g., 'user authentication'). Locates code based on natural language descriptions instead of exact keywords, returning relevant files, signatures, and documentation.
⚠️ PREREQUISITE: This tool requires an active knot-mcp server with vector database (Qdrant) and graph database (Neo4j) initialized. If running in lightweight 'only-clients' mode, semantic search is disabled and this tool will fail with: 'Semantic search is disabled in lightweight build. Please use find_callers or explore_file instead.' In such cases, use 'find_callers' for reverse dependency lookups or 'explore_file' for file structure inspection instead.
Behavior & Return: Performs a read-only dual query against vector DB (for semantic similarity) and graph DB (for architectural relationships). Returns Markdown-formatted results with file paths, line numbers, code snippets, and cross-repository dependencies. No side effects.
Usage: Use as your FIRST step when exploring unfamiliar code or discovering architectural patterns. Do NOT use this to find all usages of a specific function—use the 'find_callers' tool for that instead.
Parameter guidance: 'query' should be 2-5 words describing functionality. Increase 'max_results' to 10-20 for broad discovery, keep at 5 for focused search. Include 'repo_name' in your first query to avoid cross-repository pollution.
Supports Java, Kotlin, and TypeScript codebases.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max_results | No | Maximum number of results to return (default: 5) | |
| repo_name | No | Optional but HIGHLY RECOMMENDED: repository name to filter results to a specific codebase (e.g., 'my-java-repo'). If you know the repository you are working on, include this in your FIRST query to avoid mixed results from other indexed projects. Omit only to search across all repositories. | |
| query | Yes | Search query describing what you're looking for (e.g., 'user authentication', 'API error handling') |