Store an app file
file_writePersist app files by writing base64-encoded content to a specified path, creating new files or overwriting existing ones so the app can reuse them across chats.
Instructions
Store a file for an app (create or overwrite by path). data_base64 is the file bytes, base64-encoded — pass any file the user gave you or that you generated. Overwriting an existing path bumps its version. Single-call writes are limited to a few MiB. Files persist and are the app's own, reusable across chats.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app | Yes | the app this file belongs to | |
| mime | No | content type, e.g. 'image/png' (default application/octet-stream) | |
| path | Yes | logical file name, e.g. 'receipt.pdf' or 'exports/2026-q1.csv' | |
| command_id | Yes | idempotency key — a fresh uuid per write | |
| data_base64 | Yes | file bytes, base64-encoded | |
| expected_version | No | the version you last saw, for optimistic concurrency (optional) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app | Yes | ||
| mime | Yes | ||
| path | Yes | ||
| size | Yes | ||
| sha256 | Yes | ||
| version | Yes | ||
| files_version | Yes |