injectOverviewInstructions() — mcp Function Reference
Architecture documentation for the injectOverviewInstructions() function in server.ts from the mcp codebase.
Entity Profile
Dependency Diagram
graph TD 6cc13fa0_0ce9_926f_417f_6b3f50082f67["injectOverviewInstructions()"] 08ca54b2_22bc_134f_e028_7c18da8dca8a["start()"] 08ca54b2_22bc_134f_e028_7c18da8dca8a -->|calls| 6cc13fa0_0ce9_926f_417f_6b3f50082f67 90d142ad_ab97_605e_ade9_a397841554ce["getTestHint()"] 6cc13fa0_0ce9_926f_417f_6b3f50082f67 -->|calls| 90d142ad_ab97_605e_ade9_a397841554ce 82b72c82_f107_1ece_5ba4_a66ed36389be["renderOverview()"] 6cc13fa0_0ce9_926f_417f_6b3f50082f67 -->|calls| 82b72c82_f107_1ece_5ba4_a66ed36389be b8971bfc_ba3c_23a9_1f17_5d613ac67105["debug()"] 6cc13fa0_0ce9_926f_417f_6b3f50082f67 -->|calls| b8971bfc_ba3c_23a9_1f17_5d613ac67105 dfe11f52_4dd3_db89_9717_941d05bae091["warn()"] 6cc13fa0_0ce9_926f_417f_6b3f50082f67 -->|calls| dfe11f52_4dd3_db89_9717_941d05bae091 style 6cc13fa0_0ce9_926f_417f_6b3f50082f67 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
src/server.ts lines 288–308
private injectOverviewInstructions(repoMap: Map<string, import('./cache/graph-cache').IndexedGraph>) {
if (repoMap.size === 0) return;
// Skip overview injection during experiments to isolate variables (except graphrag)
if (process.env.SUPERMODEL_EXPERIMENT && process.env.SUPERMODEL_EXPERIMENT !== 'graphrag') return;
// Only inject if there's exactly 1 unique graph (SWE-bench always has exactly 1 repo)
const uniqueGraphs = new Set([...repoMap.values()]);
if (uniqueGraphs.size !== 1) return;
const graph = [...uniqueGraphs][0];
try {
const overview = renderOverview(graph);
const testHint = this.getTestHint(graph.summary.primaryLanguage);
const current = (this.server.server as any)._instructions as string | undefined;
(this.server.server as any)._instructions = (current || '') + '\n\n' + overview + testHint;
logger.debug('Injected overview into server instructions');
} catch (err: any) {
logger.warn('Failed to render overview for instructions:', err.message || err);
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does injectOverviewInstructions() do?
injectOverviewInstructions() is a function in the mcp codebase.
What does injectOverviewInstructions() call?
injectOverviewInstructions() calls 4 function(s): debug, getTestHint, renderOverview, warn.
What calls injectOverviewInstructions()?
injectOverviewInstructions() is called by 1 function(s): start.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free