finalize_media_upload
STEP 3 of the media upload flow: call AFTER you have PUT the raw bytes to the presigned uploadUrl from prepare_media_upload. Registers the object as a MediaAsset in the org media library and returns it (its publicUrl is what you pass to schedule_post mediaUrls). Pass the same key/contentType/size from step 1. Idempotent: re-finalizing the same key returns the existing asset. CAPABILITY: draft: creates content that cannot reach an audience on its own. Safe for a draft-only agent token.
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": {
"key": "<key>",
"contentType": "<contentType>",
"size": "<size>"
},
"name": "finalize_media_upload"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | The object key returned by prepare_media_upload. | |
| size | Yes | Exact file size in bytes. | |
| contentType | Yes | Same MIME type used in prepare_media_upload. |