JSONRPCErrorResponse.toMCP constructor
Builds a JSONRPCErrorResponse from a decoded MCP JSON map.
Implementation
factory JSONRPCErrorResponse.toMCP(Map<String, Object?> map) {
return JSONRPCErrorResponse(
jsonrpc: map['jsonrpc']?.toString() ?? '2.0',
id: map['id']?.toString() ?? '-1',
error: Error.toMCP(map['error'] as Map<String, Object?>),
);
}