I think it would be a good idea to make the "text_editor" tool actually edit text. I've repeatedly seen the behavior in the below thread where it tries to edit the file but fails as it's read-only.
https://assistant.kagi.com/share/efec0ab4-2a67-4e50-a4d5-f45f8ab0d153