getHubFunctions() — mcp Function Reference
Architecture documentation for the getHubFunctions() function in overview.ts from the mcp codebase.
Entity Profile
Dependency Diagram
graph TD ff178654_5fa6_94e9_c0b1_04b8c002c018["getHubFunctions()"] 242ec636_ba33_547c_5cb6_5f619c73d099["overview.ts"] ff178654_5fa6_94e9_c0b1_04b8c002c018 -->|defined in| 242ec636_ba33_547c_5cb6_5f619c73d099 aea9c930_f1b1_d4dc_72c2_803aeb181aad["renderOverview()"] aea9c930_f1b1_d4dc_72c2_803aeb181aad -->|calls| ff178654_5fa6_94e9_c0b1_04b8c002c018 2ef71e67_fa6d_b33f_d005_85a400698718["get()"] ff178654_5fa6_94e9_c0b1_04b8c002c018 -->|calls| 2ef71e67_fa6d_b33f_d005_85a400698718 59a82797_f6a2_36aa_02bd_7b2f22d1bc50["normalizePath()"] ff178654_5fa6_94e9_c0b1_04b8c002c018 -->|calls| 59a82797_f6a2_36aa_02bd_7b2f22d1bc50 style ff178654_5fa6_94e9_c0b1_04b8c002c018 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/tools/overview.ts lines 151–170
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
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does getHubFunctions() do?
getHubFunctions() is a function in the mcp codebase, defined in src/tools/overview.ts.
Where is getHubFunctions() defined?
getHubFunctions() is defined in src/tools/overview.ts at line 151.
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