MCPcopy Create free account
hub / github.com/echoVic/blade-code / createToolManager

Function createToolManager

src/tools/index.ts:48–71  ·  view source on GitHub ↗
(
  config: ToolManagerConfig = {},
  includeBuiltinTools: boolean = true
)

Source from the content-addressed store, hash-verified

46 * 创建工具管理器并注册内置工具
47 */
48export async function createToolManager(
49 config: ToolManagerConfig = {},
50 includeBuiltinTools: boolean = true
51): Promise<ToolManager> {
52 const toolManager = new ToolManager(config);
53
54 if (includeBuiltinTools) {
55 // 注册所有内置工具
56 const allBuiltinTools: ToolDefinition[] = [
57 ...textProcessingTools,
58 ...fileSystemTools,
59 ...networkTools,
60 ...utilityTools,
61 ...gitTools,
62 ...smartTools,
63 ];
64
65 for (const tool of allBuiltinTools) {
66 await toolManager.registerTool(tool);
67 }
68 }
69
70 return toolManager;
71}
72
73/**
74 * 按分类获取内置工具

Callers 12

mcpCommandFunction · 0.85
toolsCommandFunction · 0.85
initMethod · 0.85
mainFunction · 0.85
basicExampleFunction · 0.85
textProcessingExampleFunction · 0.85
utilityToolsExampleFunction · 0.85
networkToolsExampleFunction · 0.85
customToolExampleFunction · 0.85
statsExampleFunction · 0.85

Calls 1

registerToolMethod · 0.95

Tested by

no test coverage detected