Home / Function/ buildSubdomainToParentMap() — mcp Function Reference

buildSubdomainToParentMap() — mcp Function Reference

Architecture documentation for the buildSubdomainToParentMap() function in explore-function.ts from the mcp codebase.

Entity Profile

Dependency Diagram

graph TD
  79b44b57_42bd_0224_2b6c_fa2bf3ff180e["buildSubdomainToParentMap()"]
  1767161e_720a_f6c8_bf00_3dc68740b823["handler()"]
  1767161e_720a_f6c8_bf00_3dc68740b823 -->|calls| 79b44b57_42bd_0224_2b6c_fa2bf3ff180e
  d6ed9355_f977_306b_b0ef_d7220fdefe68["get()"]
  79b44b57_42bd_0224_2b6c_fa2bf3ff180e -->|calls| d6ed9355_f977_306b_b0ef_d7220fdefe68
  6407330b_8aa1_cc04_569a_747f6b1debfd["set()"]
  79b44b57_42bd_0224_2b6c_fa2bf3ff180e -->|calls| 6407330b_8aa1_cc04_569a_747f6b1debfd
  style 79b44b57_42bd_0224_2b6c_fa2bf3ff180e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/tools/explore-function.ts lines 74–95

function buildSubdomainToParentMap(graph: IndexedGraph): Map<string, string> {
  const map = new Map<string, string>();
  const relationships = graph.raw.graph?.relationships || [];

  for (const rel of relationships) {
    if (rel.type !== 'partOf') continue;
    const startNode = graph.nodeById.get(rel.startNode);
    const endNode = graph.nodeById.get(rel.endNode);
    if (
      startNode?.labels?.[0] === 'Subdomain' &&
      endNode?.labels?.[0] === 'Domain'
    ) {
      const subName = startNode.properties?.name as string;
      const domName = endNode.properties?.name as string;
      if (subName && domName) {
        map.set(subName, domName);
      }
    }
  }

  return map;
}

Domain

Subdomains

Calls

Called By

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free