I don't think there is clear direction on how to specify agents to write to file system in the documentation. I often fail with this. This morning I wrote a script and added this system prompt to the script:
I expected this to ensure the tool call would be handled properly. However, even though the tool was called, the file was not created. I'm not sure if I was using the right system prompt, but the documentation can be more explicit on this point.
I always have to use programmatic techniques to read and write to the file system, which limits my usecases.