Store an app file
file_writeStore or overwrite an app's file by path using base64-encoded bytes; files persist across chats and overwriting bumps the version.
Instructions
Store a file for an app (create or overwrite by path). data_base64 carries the file bytes, base64-encoded. Overwriting an existing path bumps its version. A file is limited to a few MiB. Files persist and are the app's own, reusable across chats.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"command_id": "<command_id>",
"app": "<app>",
"path": "<path>",
"data_base64": "<data_base64>"
},
"name": "file_write"
}
}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 |