I'm not really sure I understand your sorting example, maybe try it out in gpt and post the link to show exactly what you mean.
The refusal of the model is something trained into the model by the process of rlhf, and it can also be untrained, by the process of abliteration [1].
Also, LLMs are capable of using tools in this very moment [2].
[1]: https://huggingface.co/blog/mlabonne/abliteration [2]: https://www.anthropic.com/news/analysis-tool