MCPcopy Index your code
hub / github.com/codeaashu/claude-code / getToolList

Function getToolList

mcp-server/src/server.ts:107–118  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

105}
106
107async function getToolList(): Promise<ToolInfo[]> {
108 const toolsDir = path.join(SRC_ROOT, "tools");
109 const entries = await fs.readdir(toolsDir, { withFileTypes: true });
110 const tools: ToolInfo[] = [];
111 for (const e of entries) {
112 if (!e.isDirectory() || e.name === "shared" || e.name === "testing")
113 continue;
114 const files = await listDir(path.join(toolsDir, e.name));
115 tools.push({ name: e.name, directory: `tools/${e.name}`, files });
116 }
117 return tools.sort((a, b) => a.name.localeCompare(b.name));
118}
119
120async function getCommandList(): Promise<CommandInfo[]> {
121 const cmdsDir = path.join(SRC_ROOT, "commands");

Callers 1

createServerFunction · 0.85

Calls 2

listDirFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected