Start an upload
create_media_uploadStep 1 of an upload: returns an address to PUT the file to (with exactly the returned headers). Then call confirm_media_upload. Only usable where you can send files, e.g. with curl.
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": {
"file_name": "<file_name>",
"content_type": "<content_type>",
"size": "<size>"
},
"name": "create_media_upload"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | Yes | Bytes. | |
| sha256 | No | Optional hex digest of the file. | |
| file_name | Yes | File name including the extension, for example photo.jpg. | |
| content_type | Yes | The file's media type. It must match the file you are going to upload. |