File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -192,6 +192,12 @@ export class MCPServer extends BaseMCPServer {
192192 switch ( name ) {
193193 case ToolName . Ping : {
194194 if ( this . ctx . props . accessToken && this . ctx . props . instanceUrl ) {
195+ if ( ! this . getThoughtSpotService ( recorder ) . validateConnection ( ) ) {
196+ return this . createErrorResponse (
197+ "Failed to validate connection" ,
198+ "Ping failed" ,
199+ ) ;
200+ }
195201 return this . createSuccessResponse ( "Pong" , "Ping successful" ) ;
196202 }
197203 return this . createErrorResponse ( "Not authenticated" , "Ping failed" ) ;
@@ -220,6 +226,12 @@ export class MCPServer extends BaseMCPServer {
220226 "Check connectivity failed" ,
221227 ) ;
222228 }
229+ if ( ! this . getThoughtSpotService ( recorder ) . validateConnection ( ) ) {
230+ return this . createErrorResponse (
231+ "Failed to validate connection" ,
232+ "Check connectivity failed" ,
233+ ) ;
234+ }
223235 return this . createStructuredContentSuccessResponse (
224236 { success : true } ,
225237 "Check connectivity successful" ,
You can’t perform that action at this time.
0 commit comments