Testing in Script Editor with the language selector at top left set to JavaScript (rather than AppleScript) suggests that you could use an Execute JavaScript for Automation action.
(() => {
"use strict";
const operaWin = Application("Opera").windows.at(0);
return operaWin.exists()
? (() => {
const tab = operaWin.tabs.at(0);
return tab.exists()
? `[${tab.name()}](${tab.url()})`
: "No front tab found in Opera";
})()
: "No window open in Opera.";
})();