Home / Function/ getHubFunctions() — mcp Function Reference

getHubFunctions() — mcp Function Reference

Architecture documentation for the getHubFunctions() function in overview.ts from the mcp codebase.

Entity Profile

Dependency Diagram

graph TD
  7447e270_7494_99ba_d664_188091d75987["getHubFunctions()"]
  82b72c82_f107_1ece_5ba4_a66ed36389be["renderOverview()"]
  82b72c82_f107_1ece_5ba4_a66ed36389be -->|calls| 7447e270_7494_99ba_d664_188091d75987
  55bde18a_7860_173e_f211_5874970475e3["get()"]
  7447e270_7494_99ba_d664_188091d75987 -->|calls| 55bde18a_7860_173e_f211_5874970475e3
  d16dc47a_bbc0_2745_401a_8a4d3b67257e["normalizePath()"]
  7447e270_7494_99ba_d664_188091d75987 -->|calls| d16dc47a_bbc0_2745_401a_8a4d3b67257e
  style 7447e270_7494_99ba_d664_188091d75987 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/tools/overview.ts lines 154–173

function getHubFunctions(graph: IndexedGraph, limit: number): { name: string; filePath: string; line: number; callerCount: number }[] {
  const hubs: { name: string; filePath: string; line: number; callerCount: number }[] = [];

  for (const [nodeId, adj] of graph.callAdj) {
    if (adj.in.length < 3) continue;

    const node = graph.nodeById.get(nodeId);
    if (!node) continue;

    const name = node.properties?.name as string;
    const filePath = node.properties?.filePath as string;
    const line = node.properties?.startLine as number;
    if (!name || !filePath) continue;

    hubs.push({ name, filePath: normalizePath(filePath), line: line || 0, callerCount: adj.in.length });
  }

  hubs.sort((a, b) => b.callerCount - a.callerCount);
  return hubs.slice(0, limit);
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does getHubFunctions() do?
getHubFunctions() is a function in the mcp codebase.
What does getHubFunctions() call?
getHubFunctions() calls 2 function(s): get, normalizePath.
What calls getHubFunctions()?
getHubFunctions() is called by 1 function(s): renderOverview.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free