ping method
Pings the active MCP session.
Implementation
Future<McpJsonMap> ping({
Object? id,
bool streamable = true,
bool directJson = false,
String? protocolVersion,
Map<String, String> headers = const <String, String>{},
}) async {
final response = await request(
'ping',
id: id,
streamable: directJson ? false : streamable,
includeSession: !directJson,
protocolVersion: protocolVersion,
headers: headers,
);
return _jsonRpcResultFrom(response, method: 'ping');
}