callConnectanumMethod method

Future<McpJsonMap> callConnectanumMethod(
  1. String method, {
  2. Object? id,
  3. McpJsonMap params = const <String, Object?>{},
  4. bool streamable = true,
  5. bool includeSession = true,
  6. String? protocolVersion,
  7. Map<String, String> headers = const <String, String>{},
})

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);
}