()
| 222 | } |
| 223 | |
| 224 | async ping(): Promise<{ _meta?: Record<string, any> }> { |
| 225 | if (!this.isConnected) { |
| 226 | throw new McpConnectionError('Not connected to server', this.config.name) |
| 227 | } |
| 228 | |
| 229 | try { |
| 230 | logger.info(`[${this.config.name}] Sending ping to server`) |
| 231 | const response = await this.client.ping() |
| 232 | logger.info(`[${this.config.name}] Ping successful`) |
| 233 | return response |
| 234 | } catch (error) { |
| 235 | logger.error(`[${this.config.name}] Ping failed:`, error) |
| 236 | throw error |
| 237 | } |
| 238 | } |
| 239 | |
| 240 | hasListChangedCapability(): boolean { |
| 241 | return !!this.client.getServerCapabilities()?.tools?.listChanged |
no test coverage detected