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
  73a484a3_5184_3a80_94a1_6b67c84b4f69["buildSubdomainToParentMap()"]
  fdc0fb6f_bf66_23e1_e32e_b17145da77c5["handler()"]
  fdc0fb6f_bf66_23e1_e32e_b17145da77c5 -->|calls| 73a484a3_5184_3a80_94a1_6b67c84b4f69
  55bde18a_7860_173e_f211_5874970475e3["get()"]
  73a484a3_5184_3a80_94a1_6b67c84b4f69 -->|calls| 55bde18a_7860_173e_f211_5874970475e3
  b965d3cf_dacd_81fc_77e7_dbe9bdef8bbc["set()"]
  73a484a3_5184_3a80_94a1_6b67c84b4f69 -->|calls| b965d3cf_dacd_81fc_77e7_dbe9bdef8bbc
  style 73a484a3_5184_3a80_94a1_6b67c84b4f69 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