Get a file upload link
create_file_uploadGet a link to upload a local file as is (image, PDF, export…, 10 MB at most), when you have a shell: the reliable way for a binary file, instead of copying its base64 into save_file.
Same arguments as save_file, without the content: sha256 is the hash of the local file
(sha256sum <path>), and only that content is accepted. Then run the returned curl command
within 15 minutes, with replaced by the file: its reply is the saved version, or an error
as JSON ({"error": {"code", "message", "field"}}). Nothing is saved until then.
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>",
"sha256": "<sha256>"
},
"name": "create_file_upload"
}
}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 | Yes | SHA-256 of the content, in hexadecimal (64 characters). | |
| description | No | ||
| content_type | No | ||
| linked_notes | No | ||
| linked_tasks | No | ||
| expected_version | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| curl | Yes | Ready-to-run command: replace <path> with the local file. | |
| method | Yes | Always PUT. | |
| headers | Yes | Headers to send with the content, the upload token included. | |
| expires_at | Yes | The link works for 15 minutes. | |
| upload_url | Yes |