ping method

Future<void> ping()

Sends ping and completes when the peer answers.

The result is empty by definition; this is a liveness probe, so the value is that it returned at all.

Implementation

Future<void> ping() async {
  if (!_initialized) {
    throw McpError('Client is not initialized');
  }
  await _sendRequest('ping', const {});
}