MCPcopy Create free account
hub / github.com/anus-dev/ANUS / discoverAllTools

Method discoverAllTools

packages/core/src/tools/tool-registry.ts:215–234  ·  view source on GitHub ↗

* Discovers tools from project (if available and configured). * Can be called multiple times to update discovered tools. * This will discover tools from the command line and from MCP servers.

()

Source from the content-addressed store, hash-verified

213 * This will discover tools from the command line and from MCP servers.
214 */
215 async discoverAllTools(): Promise<void> {
216 // remove any previously discovered tools
217 this.removeDiscoveredTools();
218
219 this.config.getPromptRegistry().clear();
220
221 await this.discoverAndRegisterToolsFromCommand();
222
223 // discover tools using MCP servers, if configured
224 await discoverMcpTools(
225 this.config.getMcpServers() ?? {},
226 this.config.getMcpServerCommand(),
227 this,
228 this.config.getPromptRegistry(),
229 this.config.getDebugMode(),
230 this.config.getWorkspaceContext(),
231 );
232
233 // TODO: Add optional debug logging for tool registration if needed
234 }
235
236 /**
237 * Discovers tools from project (if available and configured).

Callers 2

createToolRegistryMethod · 0.95

Calls 9

removeDiscoveredToolsMethod · 0.95
discoverMcpToolsFunction · 0.85
getPromptRegistryMethod · 0.80
getMcpServersMethod · 0.80
getMcpServerCommandMethod · 0.80
getDebugModeMethod · 0.80
getWorkspaceContextMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected