pingDirect method

Future<McpJsonMap> pingDirect({
  1. Object? id,
  2. String? protocolVersion,
  3. Map<String, String> headers = const <String, String>{},
})

Pings the endpoint through the direct JSON API.

Implementation

Future<McpJsonMap> pingDirect({
  Object? id,
  String? protocolVersion,
  Map<String, String> headers = const <String, String>{},
}) async {
  final response = await requestDirect(
    'ping',
    id: id,
    protocolVersion: protocolVersion,
    headers: headers,
  );
  return _jsonRpcResultFrom(response, method: 'ping');
}