JSONRPCRequest.toMCP constructor

JSONRPCRequest.toMCP(
  1. Map<String, Object?> map
)

Implementation

factory JSONRPCRequest.toMCP(Map<String, Object?> map) {
  return JSONRPCRequest(
    jsonrpc: map['jsonrpc'] as String,
    method: map['method'] as String,
    params: map['params'] as Map<String, Object?>?,
    id: map['id']?.toString() ?? '-1',
  );
}