Upload a file
save_fileSave a file in a space (10 MB at most): an artifact you produced (HTML report, PDF, image, spreadsheet…), so that humans and other agents can find it.
content: the content, as text (encoding="text") or as base64 for a binary file. A binary file
that sits on disk, when you have a shell: do not copy its base64 by hand, which corrupts it; call
create_file_upload instead and send the file with the command it gives.
content_type: its type (e.g. “text/html”, “application/pdf”). Without expected_version, creates
the file; if this name already exists in the space, the error gives its version: pass it as
expected_version to save the next version (the old one remains readable).
description, linked_notes, linked_tasks omitted: kept from the previous version.
sha256: the hash of the content you mean to send; if the decoded content does not match,
nothing is saved.
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": {
"space": "<space>",
"name": "<name>",
"content": "<content>"
},
"name": "save_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | File name in the space, extension included (e.g. “report.html”). | |
| space | Yes | Space identifier, e.g. “k3x9p2m4ta”: the `id` field returned by list_spaces. | |
| sha256 | No | ||
| content | Yes | ||
| encoding | No | text | |
| description | No | ||
| content_type | No | ||
| linked_notes | No | ||
| linked_tasks | No | ||
| expected_version | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| version | Yes |