()
| 104 | } |
| 105 | |
| 106 | async initialize() { |
| 107 | if (this._tools === null) { |
| 108 | this.client = await this.createClient() |
| 109 | |
| 110 | this._tools = await this.client.request({ method: 'tools/list' }, ListToolsResultSchema) |
| 111 | |
| 112 | this.tools = await this.get_tools() |
| 113 | |
| 114 | // Close the initial client after initialization |
| 115 | await this.client.close() |
| 116 | } |
| 117 | } |
| 118 | |
| 119 | async get_tools(): Promise<Tool[]> { |
| 120 | if (this._tools === null || this.client === null) { |
no test coverage detected