Why do you need the AI to write a script? Why not have the AI do the work without a "script"?
Would you rather press a button and go through a simple process that's normalized across all crud apps or talk to a chatbot every time you want to solve a problem and invoke external apis?