I don’t have a handy way to help, but you might want to check if it’s even possible. I discovered recently that remote-hosted databases do not respond the same way to AppleScript as they do locally:
In the above link, I found that FileMaker databases hosted remotely can not even provide basics like record properties.
So it’s possible a local AppleScript won’t be able to “see” any scripts in a remote-hosted database.
If that’s the case, you’d have to make a local-hosted database that could initiate the remote script via FileMaker’s own ScriptMaker language (which seems to work fine on remote-hosted databases).