In all the work I've done with InDesign Server, I've never given a moments thought to the #target command. I think that's largely because in my case, I've been working with Typefi Publish and it launches my scripts and they are by definition targeted to ID Server.
Within the scripts, there's quite a lot to look out for. Nearly all UI-related stuff is unavailable. So, for example, there is no such thing as
in ID server. That's one of the reasons I use app.documents in all my scripts, whether for server or desktop. Similarly, anything related to windows is unavailable and will cause errors.
If you have ESTK installed on a machine with InDesign Server, you should be able to see its object model in the Object Model Viewer under ESTK's Help menu.