Upload a file
upload_fileCreates an upload for an input file and returns its file id and where to send the bytes: PUT them to upload.url with the headers it lists (or, for a large file, each part to its URL), then call complete_upload. Name the file in a run's inputs by its file id.
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>",
"content_type": "<content_type>",
"size_bytes": "<size_bytes>"
},
"name": "upload_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The file name. | |
| sha256 | No | Optional hex sha256 of the bytes, checked at complete_upload. | |
| size_bytes | Yes | The exact size in bytes. The upload URL accepts this size only. | |
| content_type | Yes | The media type, such as video/quicktime or image/png. | |
| idempotency_key | No | Optional. Retrying with the same key and the same request within 24 hours returns the first answer instead of doing it twice. |