describeNode() — mcp Function Reference
Architecture documentation for the describeNode() function in explore-function.ts from the mcp codebase.
Entity Profile
Dependency Diagram
graph TD 84fa1508_0318_0a6b_dd7c_b4917273b2b4["describeNode()"] fdc0fb6f_bf66_23e1_e32e_b17145da77c5["handler()"] fdc0fb6f_bf66_23e1_e32e_b17145da77c5 -->|calls| 84fa1508_0318_0a6b_dd7c_b4917273b2b4 55bde18a_7860_173e_f211_5874970475e3["get()"] 84fa1508_0318_0a6b_dd7c_b4917273b2b4 -->|calls| 55bde18a_7860_173e_f211_5874970475e3 d16dc47a_bbc0_2745_401a_8a4d3b67257e["normalizePath()"] 84fa1508_0318_0a6b_dd7c_b4917273b2b4 -->|calls| d16dc47a_bbc0_2745_401a_8a4d3b67257e 3dd2d606_47d5_76c9_c834_83fbfb172417["resolveDomain()"] 84fa1508_0318_0a6b_dd7c_b4917273b2b4 -->|calls| 3dd2d606_47d5_76c9_c834_83fbfb172417 style 84fa1508_0318_0a6b_dd7c_b4917273b2b4 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/tools/explore-function.ts lines 138–166
function describeNode(
graph: IndexedGraph,
nodeId: string,
refSubdomain: string | null,
subdomainToParent: Map<string, string>
): string {
const node = graph.nodeById.get(nodeId);
if (!node) return '(unknown)';
const name = node.properties?.name as string || '(unknown)';
const filePath = normalizePath(node.properties?.filePath as string || '');
const { subdomain, domain } = resolveDomain(graph, nodeId, subdomainToParent);
let loc = '';
if (subdomain && domain) loc = `${subdomain} subsystem, ${domain} domain`;
else if (subdomain) loc = `${subdomain} subsystem`;
else if (domain) loc = `${domain} domain`;
let line = `\`${name}\``;
if (filePath) line += ` — ${filePath}`;
if (loc) line += ` — ${loc}`;
// Flag cross-subsystem edges
if (refSubdomain && subdomain && subdomain !== refSubdomain) {
line += ' ← DIFFERENT SUBSYSTEM';
}
return line;
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does describeNode() do?
describeNode() is a function in the mcp codebase.
What does describeNode() call?
describeNode() calls 3 function(s): get, normalizePath, resolveDomain.
What calls describeNode()?
describeNode() 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