The JavaScript docs do not state this: https://github.com/mpv-player/mpv/blob/master/DOCS/man/javascript.rst
These are poorly-written at best, and require extra steps (you should be able to just add custom options without separating them into a separate file). I see why people hate mpv now.
Also, looking at other people’s code for scrobbling, it looks like you can’t make outbound POST connections directly from the script, needing to run an external executable to do so on your behalf. That you can’t send data outward, but you can run arbitrary programs, is absolutely retarded.