At the moment there is no way to pass parameters for groovy remote script execution via script or scriptText POST requests. One of the option that can be used to provide arguments can be implemented via POST request query attribute-value pairs, like
http://localhost:8080/scriptText?param1=value1¶m2=value2 ...
Correspondingly, the groovy script can be provided with parameters using binding either for each attribute (excluding such default parameters like: script which contains the script code itself or r which corresponds to result, etc.), or via dedicated binding query or any suitable.