Home / Function/ getKeyFilesForDomain() — mcp Function Reference

getKeyFilesForDomain() — mcp Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  b6f7b7c8_7cab_7043_2009_a1b28140596f["getKeyFilesForDomain()"]
  d8e22e5c_06d6_3c1a_d1ff_f9f562d53e5d["renderOverview()"]
  d8e22e5c_06d6_3c1a_d1ff_f9f562d53e5d -->|calls| b6f7b7c8_7cab_7043_2009_a1b28140596f
  d6ed9355_f977_306b_b0ef_d7220fdefe68["get()"]
  b6f7b7c8_7cab_7043_2009_a1b28140596f -->|calls| d6ed9355_f977_306b_b0ef_d7220fdefe68
  6666a1f2_0912_ade3_4b0e_42190c41cd97["normalizePath()"]
  b6f7b7c8_7cab_7043_2009_a1b28140596f -->|calls| 6666a1f2_0912_ade3_4b0e_42190c41cd97
  6407330b_8aa1_cc04_569a_747f6b1debfd["set()"]
  b6f7b7c8_7cab_7043_2009_a1b28140596f -->|calls| 6407330b_8aa1_cc04_569a_747f6b1debfd
  style b6f7b7c8_7cab_7043_2009_a1b28140596f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/tools/overview.ts lines 135–152

function getKeyFilesForDomain(graph: IndexedGraph, memberIds: string[]): string[] {
  // Return top 3 most common file paths
  const pathCounts = new Map<string, number>();
  for (const id of memberIds) {
    const node = graph.nodeById.get(id);
    if (!node) continue;
    const fp = node.properties?.filePath as string;
    if (fp) {
      const normalized = normalizePath(fp);
      pathCounts.set(normalized, (pathCounts.get(normalized) || 0) + 1);
    }
  }

  return [...pathCounts.entries()]
    .sort((a, b) => b[1] - a[1])
    .slice(0, 3)
    .map(([p]) => p);
}

Domain

Subdomains

Called By

Frequently Asked Questions

What does getKeyFilesForDomain() do?
getKeyFilesForDomain() is a function in the mcp codebase.
What does getKeyFilesForDomain() call?
getKeyFilesForDomain() calls 3 function(s): get, normalizePath, set.
What calls getKeyFilesForDomain()?
getKeyFilesForDomain() 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