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

Method registerTool

src/agent/ToolComponent.ts:105–112  ·  view source on GitHub ↗

* 注册工具

(tool: ToolDefinition)

Source from the content-addressed store, hash-verified

103 * 注册工具
104 */
105 public async registerTool(tool: ToolDefinition): Promise<void> {
106 if (!this.toolManager) {
107 throw new Error('工具组件未初始化');
108 }
109
110 await this.toolManager.registerTool(tool);
111 this.log(`工具 "${tool.name}" 已注册`);
112 }
113
114 /**
115 * 调用工具

Callers

nothing calls this directly

Calls 1

logMethod · 0.95

Tested by

no test coverage detected