AI makes mistakes! Undisk makes recovery instant: every write is versioned, every file is reversible.
See it heal →

What it does

Create a new file in the Undisk workspace. Fails if a file already exists at the given path. Use create_file when you need a strict ‘file must not exist’ guard; use write_file for upsert behavior. Supports UTF-8 text by default, or raw binary bytes when content is base64-encoded with encoding=‘base64’. The creation is recorded as a new version with a full audit trail. Returns version metadata including version ID and content hash.

Required scope

files:write

Parameters

ParameterTypeRequiredDescription
pathstringYesFile path for the new file (e.g., ‘reports/q1-summary.md’)
contentstringYesInitial file content. Use plain UTF-8 text by default, or base64-encoded bytes when encoding=‘base64’.
encodingstringNoContent encoding. Defaults to ‘utf-8’. Use ‘base64’ for binary files. Values: utf-8, base64.