Skip to content

Codebase intelligence for AI and humans: code health scores, auto-generated docs, git analytics, dead code detection, and architectural decisions via MCP.

fix(mcp): describe the ownership block get_overview actually returns (#2610)

Raghav Chamadiyad450f58a047f
diff --git a/docs/agent/MCP_TOOLS.md b/docs/agent/MCP_TOOLS.md
index 1a36a6fcf..586eb9391 100644
--- a/docs/agent/MCP_TOOLS.md
+++ b/docs/agent/MCP_TOOLS.md
@@ -235,7 +235,7 @@ Architecture summary, module map, and entry points.
| `"tour"` | `guided_tour` and `reading_order` — onboarding walks |
| `"decisions"` | `key_decisions`. `get_why` is the richer route |
| `"graph"` | `community_summary` — code-community clusters |
-| `"ownership"` | `knowledge_map` — top owners and knowledge silos |
+| `"ownership"` | `knowledge_map` — top 3 owners by files owned |
**When to use:** First call on any unfamiliar codebase. Gives the agent a mental map before diving into specifics. Skip on later calls in the same session; it doesn't change mid-session.
diff --git a/packages/server/src/repowise/server/mcp_server/tool_overview/history.py b/packages/server/src/repowise/server/mcp_server/tool_overview/history.py
index 43f826d77..e5147c486 100644
--- a/packages/server/src/repowise/server/mcp_server/tool_overview/history.py
+++ b/packages/server/src/repowise/server/mcp_server/tool_overview/history.py
@@ -66,13 +66,11 @@ def _build_knowledge_map(all_git: list) -> dict[str, Any]:
# Aggregate on email (the stable identity key) but never surface it — the
# payload emits a display name only, to keep contributor emails private.
owner_file_count: dict[str, int] = defaultdict(int)
- owner_pct_sum: dict[str, float] = defaultdict(float)
owner_name: dict[str, str] = {}
for g in all_git:
email = g.primary_owner_email or ""
if email:
owner_file_count[email] += 1
- owner_pct_sum[email] += float(g.primary_owner_commit_pct or 0.0)
owner_name.setdefault(email, _owner_display_name(g.primary_owner_name, email))
total_files = len(all_git) or 1
diff --git a/packages/server/src/repowise/server/mcp_server/tool_overview/tool.py b/packages/server/src/repowise/server/mcp_server/tool_overview/tool.py
index 154520ddd..9e6f2eb5d 100644
--- a/packages/server/src/repowise/server/mcp_server/tool_overview/tool.py
+++ b/packages/server/src/repowise/server/mcp_server/tool_overview/tool.py
@@ -83,7 +83,7 @@ async def get_overview(repo: str | None = None, include: list[str] | None = None
``"tour"`` — ``guided_tour`` + ``reading_order`` onboarding walks.
``"decisions"`` — ``key_decisions``; ``get_why`` is richer.
``"graph"`` — ``community_summary``, code-community clusters.
- ``"ownership"`` — ``knowledge_map``: top owners, knowledge silos.
+ ``"ownership"`` — ``knowledge_map``: top 3 owners by files owned.
"""
if repo == "all":
return await _workspace_overview()