callConnectanumMethod method
Calls a Connectanum JSON method through the active MCP session.
Implementation
Future<McpJsonMap> callConnectanumMethod(
String method, {
Object? id,
McpJsonMap params = const <String, Object?>{},
bool streamable = true,
bool includeSession = true,
String? protocolVersion,
Map<String, String> headers = const <String, String>{},
}) async {
final response = await request(
method,
id: id,
params: params,
streamable: streamable,
includeSession: includeSession,
protocolVersion: protocolVersion,
headers: _headersWithConnectanumMethodParameterHeaders(
method,
params,
headers,
),
);
return _jsonRpcResultFrom(response, method: method);
}