MCPcopy Index your code
hub / github.com/forloopcodes/contextplus / toolRetrieveWithTraversal

Function toolRetrieveWithTraversal

src/tools/memory-tools.ts:134–142  ·  view source on GitHub ↗
(options: RetrieveWithTraversalOptions)

Source from the content-addressed store, hash-verified

132}
133
134export async function toolRetrieveWithTraversal(options: RetrieveWithTraversalOptions): Promise<string> {
135 const results = await retrieveWithTraversal(options.rootDir, options.startNodeId, options.maxDepth, options.edgeFilter);
136 if (results.length === 0) return `❌ Node not found: ${options.startNodeId}`;
137
138 const sections = [`Traversal from: ${results[0].node.label} (depth limit: ${options.maxDepth ?? 2})\n`];
139 for (const result of results) sections.push(formatTraversalResult(result));
140
141 return sections.join("\n");
142}

Callers 2

index.tsFile · 0.85

Calls 2

retrieveWithTraversalFunction · 0.85
formatTraversalResultFunction · 0.85

Tested by

no test coverage detected