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
| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | Yes | File path for the new file (e.g., ‘reports/q1-summary.md’) |
content | string | Yes | Initial file content. Use plain UTF-8 text by default, or base64-encoded bytes when encoding=‘base64’. |
encoding | string | No | Content encoding. Defaults to ‘utf-8’. Use ‘base64’ for binary files. Values: utf-8, base64. |