Home / Function/ buildGraph() — mcp Function Reference

buildGraph() — mcp Function Reference

Architecture documentation for the buildGraph() function in symbol-context.test.ts from the mcp codebase.

Entity Profile

Dependency Diagram

graph TD
  d6ad31c3_e18b_0658_e475_b322f381fe73["buildGraph()"]
  11d5249b_82de_e1fb_e621_e95ae1a093c5["buildIndexes()"]
  d6ad31c3_e18b_0658_e475_b322f381fe73 -->|calls| 11d5249b_82de_e1fb_e621_e95ae1a093c5
  style d6ad31c3_e18b_0658_e475_b322f381fe73 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/tools/symbol-context.test.ts lines 12–21

function buildGraph(
  nodes: Array<{ id: string; labels: string[]; properties: Record<string, unknown> }>,
  relationships: Array<{ id: string; type: string; startNode: string; endNode: string; properties?: Record<string, unknown> }> = [],
) {
  const raw: any = {
    repo: 'test-repo',
    graph: { nodes, relationships: relationships.map(r => ({ ...r, properties: r.properties ?? {} })) },
  };
  return buildIndexes(raw, 'test-key');
}

Domain

Subdomains

Frequently Asked Questions

What does buildGraph() do?
buildGraph() is a function in the mcp codebase.
What does buildGraph() call?
buildGraph() calls 1 function(s): buildIndexes.

Analyze Your Own Codebase

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

Try Supermodel Free