Delete SMS on SIM inbox

Hello All,
I am trying to run a script periodically to delete SMS from SIM storage (inbox), as when it gets full MikroTik cant receive new SMS.
I found below command from internet but not working when used in script, need help as I am not expert in scripting.

.

/interface ppp-client info ppp-out1 user-command="AT+CMGF=1"