()
| 169 | } |
| 170 | |
| 171 | async initialize() { |
| 172 | if (this._tools === null) { |
| 173 | this.client = await this.createClient() |
| 174 | |
| 175 | this._tools = await this.client.request({ method: 'tools/list' }, ListToolsResultSchema) |
| 176 | |
| 177 | this.tools = await this.get_tools() |
| 178 | |
| 179 | // Close the initial client after initialization |
| 180 | await this.client.close() |
| 181 | } |
| 182 | } |
| 183 | |
| 184 | async get_tools(): Promise<Tool[]> { |
| 185 | if (this._tools === null || this.client === null) { |
no test coverage detected