feat(tools): add lore_dependents tool for unified reverse-dependency queries#204
Merged
feat(tools): add lore_dependents tool for unified reverse-dependency queries#204
Conversation
…queries (#178) Add a new lore_dependents MCP tool that returns the full blast radius of a symbol or file in a single call, aggregating callers, importers, subclasses, and type references across all edge types. - Name-based input (symbol name or file path), not numeric IDs - Cross-kind aggregation in one response - Transitive closure via depth param (1-5 hops) - Compact mode to reduce token count - Branch filtering support - Disambiguation when multiple symbols match - 25 tests covering symbol/file queries, multi-hop, compact mode, branch filtering, ambiguity, and empty results Closes #178
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #204 +/- ##
==========================================
+ Coverage 88.10% 88.23% +0.13%
==========================================
Files 79 80 +1
Lines 8870 9020 +150
Branches 2764 2791 +27
==========================================
+ Hits 7815 7959 +144
- Misses 1055 1061 +6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Merged
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.
Summary
Implements #178 — adds a new
lore_dependentsMCP tool that answers "what is affected if I change X?" in a single call.Changes
New:
src/server/tools/dependents.tscallers,importers,subclasses, andtype_referencesin one responsedepthparam (1–5) follows dependents N hops deep via frontier expansioncompact: truestrips provenance fields (line, character, resolution_method) to reduce tokensbranchparam filters all queriesModified:
src/server/tool-registry.tslore_dependentsinbuildToolModules()New:
tests/server/tools/dependents.test.ts