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

Method searchTools

src/agent/ToolComponent.ts:171–181  ·  view source on GitHub ↗

* 搜索工具

(query: string)

Source from the content-addressed store, hash-verified

169 * 搜索工具
170 */
171 public searchTools(query: string): ToolDefinition[] {
172 const tools = this.getTools();
173 const lowerQuery = query.toLowerCase();
174
175 return tools.filter(
176 tool =>
177 tool.name.toLowerCase().includes(lowerQuery) ||
178 tool.description.toLowerCase().includes(lowerQuery) ||
179 (tool.tags && tool.tags.some(tag => tag.toLowerCase().includes(lowerQuery)))
180 );
181 }
182
183 /**
184 * 获取工具信息

Callers

nothing calls this directly

Calls 2

getToolsMethod · 0.95
filterMethod · 0.45

Tested by

no test coverage detected