feat(mcp): add get_why to the lean profile; present get_answer as the entry point#889
Merged
Merged
Conversation
… point Two salience gaps surfaced by running the lean surface under a real agent on a mixed question set. First, the lean profile omitted get_why, so on why/history questions — the one category a code-search surface cannot answer from the tree alone — the agent had nothing better than file reads and scored measurably below an unassisted baseline; the differentiating tool was configured out, not absent. get_why joins the lean set (~2.1k tokens of schema, still comfortably always-loadable). Second, agents routinely paid a search_codebase round-trip before get_answer even though get_answer runs the same hybrid retrieval internally — the tool descriptions never said so. get_answer now presents itself as the single entry point for questions, and search_codebase redirects question-shaped queries there, positioning itself for raw-hit use (enumeration, symbol_id resolution, scoping get_context).
|
✅ Health: 7.6 (unchanged) 📋 At a glance 🩹 Review priority (files here with the most recent bug-fix history — defects cluster, so review these first)
🔎 More signals (2)🔥 Hotspots touched (3)
💀 Dead code (1 finding)
📊 Full report · ⭐ Star Repowise · 📥 Install bot · Last updated 2026-07-17 11:53 UTC |
RaghavChamadiya
approved these changes
Jul 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Two salience gaps, both measured by running the lean surface under a real coding agent on a mixed question set:
get_why. On why/history questions — the one category a code-search surface cannot answer from the tree alone — the agent had nothing better than file reads and scored measurably below an unassisted baseline. The differentiating tool was configured out, not absent.search_codebaseround-trip beforeget_answer, even thoughget_answerruns the same hybrid retrieval internally — the tool descriptions never said so.Change
get_whyjoinsLEAN_TOOLS(~2.1k tokens of schema total, still comfortably always-loadable). Docs updated.get_answerdescribes itself as the single entry point for questions;search_codebaseredirects question-shaped queries there and positions itself for raw-hit use (enumeration, symbol_id resolution, scopingget_context).Measured effect
With
get_whyserved, the agent used it unprompted on history questions and the why-category score moved from below the unassisted baseline (7.3) to clearly above it (8.8); 21 of 32 runs opened directly withget_answer.Testing
test_tool_selection.py,test_mcp_docs_drift.py(the drift guard enforced the docs update) — 19 green.