Docs

Built-in tools›Files and search

Write file

write
Group
Files and search
Turned on by
Its own switch on the Tools page of Conversation settings.
Approval
Reviewed: writes and open-ended actions ask for approval unless the security level or an earlier “Always allow” covers them.
Profile key
tool.write.description

Creates a file, or replaces an existing one completely, with the content the model supplies.

Missing parent folders are created. The write is atomic: the file holds either the old content or the new, never part of each. Content can be up to 2 MiB.

Good to know

These checks are always on and have no setting:

  • The model must have read or written an existing file in this conversation before it replaces it; reads from before Mework restarted still count. A new file needs no read.
  • If the file changed on disk since that read, including while Mework was closed, the write is refused until the model reads it again. A file whose text is unchanged does not count as changed.
  • In Plan mode, files in a Git repository that Git does not ignore are refused, new files included. Paths outside the repository or ignored by Git can still be written.

Parameters

ParameterTypeDetails
content required
File content
stringThe complete new file content; an empty string is allowed.
path required
Path
stringTarget file, relative to the workspace.

Edit this page on GitHub