Welcome to ther Reasper Forums !
JSFXes can't directly access the Reaper API (only by the dedicated variable provided). They just work on audio and Midi streams . (The technical cause is that they work on the Track's audio thread and not on the GUI thread.)
To do things like "mute" you can (e.g.) send out a Midi CC message in the JSFX, use the "MidiToReaControlPath" VST plugin to route that information to the Reaper Control Path where an Action can see it, and do a miniature Reascript to exectute whatever you want.
Regarding mute/unmute an appropriate script is available via ReaPack. Unfortunately right now I have no idea how to propagate the information which track sent the message
.
-Michael