MCPcopy Index your code
hub / github.com/cobusgreyling/loop-engineering / listPatternDocs

Function listPatternDocs

tools/mcp-server/src/resolver.ts:176–187  ·  view source on GitHub ↗
(root: string)

Source from the content-addressed store, hash-verified

174}
175
176export async function listPatternDocs(root: string): Promise<string[]> {
177 const patternsDir = path.join(root, 'patterns');
178 if (!(await fileExists(patternsDir))) return [];
179 try {
180 const entries = await readdir(patternsDir);
181 return entries
182 .filter(e => e.endsWith('.md') && e !== 'README.md')
183 .map(e => e.replace('.md', ''));
184 } catch {
185 return [];
186 }
187}

Callers 3

server.test.mjsFile · 0.85
index.tsFile · 0.85
allowedPatternIdsFunction · 0.85

Calls 1

fileExistsFunction · 0.70

Tested by

no test coverage detected