MCPcopy Index your code
hub / github.com/simstudioai/sim / ping

Method ping

apps/sim/lib/mcp/client.ts:224–238  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

startPingHealthCheckFunction · 0.80

Calls 2

infoMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected