* 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.
()
| 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). |
no test coverage detected