Skip to content

code_hotspots

code_hotspots surfaces the most significant code in the project based on call frequency, connection complexity, or file size. Use it to quickly identify the functions most worth understanding first.

code_hotspots(type="called")
code_hotspots(type="complex", limit=10)
code_hotspots(type="large")
ParameterTypeDefaultDescription
type"called" | "complex" | "large""called"What to rank by
limitnumber10Number of results to return
ModeRanks by
calledMost called functions — the code executed most often
complexMost connections — highest number of callers + callees
largeBiggest files — most lines of code
  • Onboarding: start with type="called" to learn which functions matter most
  • Refactor planning: type="complex" reveals tightly coupled code
  • Tech debt: type="large" finds files that have grown too big
# Understand the project's hot paths first
code_hotspots(type="called")
→ PaymentService.charge (42 callers)
→ AuthService.validate (38 callers)
→ db.query (89 callers)
# Then read the top ones
code_get(name="PaymentService.charge")