From 33d1229d52ac57c634515cd362de759c98a0c680 Mon Sep 17 00:00:00 2001 From: Stephen Adamson Date: Fri, 14 Nov 2025 00:12:53 +0000 Subject: [PATCH] Fix indenting --- mcp_codebase.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mcp_codebase.py b/mcp_codebase.py index e960e71..cd3e80a 100644 --- a/mcp_codebase.py +++ b/mcp_codebase.py @@ -3007,12 +3007,13 @@ def find_brace_block_end(lines: List[str], start_idx: int) -> Optional[int]: # MCP Tools # ----------------------------- @mcp.tool() +@mcp.tool() def health_check() -> str: """What it does - Quick JSON status of the RAG server (ready, indexed path, chunk count, age, graph stats). When to use - Before any other query, to confirm the index is current and see codebase structure. When not to use - After you already know the server is healthy; it adds no value. Example - health_check() → { "status":"ready","total_chunks":11234,"graph_nodes":4567,"graph_edges":12345,"index_age_hours":4.7 }""" -try: + try: with _startup_lock: # Check if we have a git repo in working_repo repo_info = "No repository loaded" @@ -3026,6 +3027,10 @@ try: except: repo_info = "Git repository (no branch info)" + # Load graph to check if it exists + graph = LocalGraph(CODEBASE_PATH) + graph_loaded = graph.load() + status = { "status": "ready" if vectorstore is not None else "no_index", "working_repository": str(CODEBASE_PATH),