From 959484c2fa7fac1163f4eb90f3bbda3715fcf560 Mon Sep 17 00:00:00 2001 From: Stephen Adamson Date: Fri, 14 Nov 2025 02:07:59 +0000 Subject: [PATCH] change name --- mcp_codebase.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mcp_codebase.py b/mcp_codebase.py index f767ad8..0714a37 100644 --- a/mcp_codebase.py +++ b/mcp_codebase.py @@ -3228,7 +3228,7 @@ Example - health_check() → { "status":"ready","total_chunks":11234,"graph_node }, "Tools": { "NOTE": "THESE TOOLS ARE RESTRICTED BY .gitignore AS WELL AS .ragignore", - "search_codebase": "Hybrid RAG search with graph context (cross-file deps, inheritance, calls)", + "semantic_rag_search": "Hybrid RAG search with graph context (cross-file deps, inheritance, calls)", "find_code_references": "Find exact symbol references across codebase", "read_file_lines_tool": "Read specific file lines with syntax highlighting", "find_path": "Find files by glob patterns", @@ -3323,7 +3323,7 @@ def _calculate_graph_stats(graph: LocalGraph) -> dict: } @mcp.tool() -def search_codebase(query: str, top_k: int = 5, rerank: bool = True) -> str: +def semantic_rag_search(query: str, top_k: int = 5, rerank: bool = True) -> str: """Hybrid RAG search: returns ranked code snippets + file/line + docstrings + graph context (cross-file deps, inheritance, callers/callees, type refs). Use for: Open questions ("how does auth work?"), unknown patterns, architecture exploration. Natural language queries. @@ -3333,7 +3333,7 @@ rerank=False: fast, 65% accuracy | rerank=True: slower, 95% accuracy Output includes: code content, docs, cross_file:[calls/extends/uses@filepath], used_by:[entity@filepath], file:[same-file entities] -Example: search_codebase("user authentication", 5, True) → 5 results with code + "cross_file:calls:ValidateToken@auth/jwt.go|used_by:setupAuth@server/routes.go" """ +Example: semantic_rag_search("user authentication", 5, True) → 5 results with code + "cross_file:calls:ValidateToken@auth/jwt.go|used_by:setupAuth@server/routes.go" """ if vectorstore is None or bm25_corpus is None: return "❌ Index not built. Please call init_repo() or rebuild_index() first." @@ -3673,8 +3673,8 @@ def _format_reference_results(results: List[Dict], symbol: str) -> str: @mcp.tool() def read_file_lines_tool(path: str, start: int = 1, end: Optional[int] = None) -> str: """What it does - Reads a requested line range and auto-expands to include surrounding context (function body, docstring, comments). -When to use - To inspect a specific hit from find_code_references or a snippet from search_codebase. -When not to use - For browsing the entire file or unrelated sections; use search_codebase first to pinpoint relevant parts. +When to use - To inspect a specific hit from find_code_references or a snippet from semantic_rag_search. +When not to use - For browsing the entire file or unrelated sections; use semantic_rag_search first to pinpoint relevant parts. Example - read_file_lines_tool("src/auth/login.py", start=45, end=60) → full function with context. Note: This tool treats / as '/home/popertots/Crussell/' so adjust paths accordingly""" return EnhancedToon.file_content_results(read_file_lines(path, start, end), path)