Finalize media upload
finalize_media_uploadRegister an uploaded R2 object as a media file after the browser PUT completes. Use this to finalize a presigned direct upload before publishing.
Instructions
Record an uploaded R2 object as a media file after the browser PUT (pairs with create_media_upload; used by the composer UI). Use this when a presigned direct upload finished and the file must be registered (advanced).
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": {
"r2Key": "<r2Key>",
"fileName": "<fileName>",
"mimeType": "<mimeType>",
"sizeBytes": "<sizeBytes>"
},
"name": "finalize_media_upload"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| r2Key | Yes | The r2Key returned by create_media_upload. | |
| width | No | Pixel width (images/video). | |
| height | No | Pixel height (images/video). | |
| duration | No | Duration in seconds (video). | |
| fileName | Yes | Original file name. | |
| mimeType | Yes | File MIME type. | |
| sizeBytes | Yes | File size in bytes. |