Yes, pkouzmitcheu. Remediation script: https://docs.appdynamics.com/display/PRO42/Remediation+Scripts
It is the easiest way. But you need to put the script on the server. From your last reply, I think that is difficult to do.
So you can try to create a custom action to take thread dumps. https://docs.appdynamics.com/display/PRO42/Custom+Actions