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

Method getToolsByCategory

src/agent/ToolComponent.ts:153–166  ·  view source on GitHub ↗

* 按分类获取工具

()

Source from the content-addressed store, hash-verified

151 * 按分类获取工具
152 */
153 public getToolsByCategory(): Record<string, ToolDefinition[]> {
154 const tools = this.getTools();
155 const categories: Record<string, ToolDefinition[]> = {};
156
157 for (const tool of tools) {
158 const category = tool.category || 'other';
159 if (!categories[category]) {
160 categories[category] = [];
161 }
162 categories[category].push(tool);
163 }
164
165 return categories;
166 }
167
168 /**
169 * 搜索工具

Callers 1

generateToolDocsMethod · 0.95

Calls 1

getToolsMethod · 0.95

Tested by

no test coverage detected