The script command accepts arguments for a called script. This is not documented for SQLcl 24.3, but the global variable args
is documented on the Oracle GitHub repo and an example of how to use args is provided here. So, IMO the intent to support arguments for the script command is clear.
Here's the screenshot showing a syntax error when using the script command with arguments in SQL Developer Extension for VSCode 24.4.1:

In the lower-left corner, you see that the statement works in SQLcl.
Here are the sources:
script hello.js World
ctx.write('Hello, ' + args[1] + '!' + '\n');
It would be cool if the documentation for SQLcl regarding the script
command could be updated and the syntax error fixed.
Thx.