upload_asset
Upload a file you have locally as an asset. Give its name, SHA-256 and size; if the workspace already has that content, it's recorded without uploading. Otherwise you get an upload to make (method, URL, headers): make it, then call upload_asset again with the same arguments to record the asset. A file over 100 MiB gets a multipart upload instead: PUT each part to its URL, keep the ETag header each PUT returns, then call upload_asset again with the same arguments plus multipart (its upload_id and every part's part_number and etag). For a file still being written, such as a recording, leave out the SHA-256 and size: you get a multipart upload to PUT parts to as the file grows, every part but the last part_size bytes; call again with multipart (its upload_id and from, the next part's number) for more part URLs, and finish with the SHA-256, the size and every part's ETag. For a file on the web, use import_asset.
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": {
"name": "<name>"
},
"name": "upload_asset"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The path to record it under, such as `launch/intro.mp4`. Folders are made by naming them. | |
| size | No | The file's size in bytes. | |
| sha256 | No | The file's SHA-256, lowercase hex. Leave it and `size` out while the file is still being written, such as a recording, to upload it in parts as it grows. | |
| multipart | No | The multipart upload an earlier request answered with. With `sha256` and `size`, it finishes it once every part is up; without them, it asks for more part URLs of an upload of unknown size. | |
| overwrite | No | Replace an asset already at this name (the default); false refuses with 409 instead. | |
| project_id | No | The project it belongs to; the workspace's default project when absent. | |
| content_type | No | Guessed from the name's extension when absent. |