prepare_media_upload
STEP 1 of the media upload flow (use this for any real image/video, see upload_media only for tiny files). Returns a short-lived PRESIGNED upload URL you PUT the raw file bytes to yourself, outside MCP, with NO credentials (the signature is in the URL). Then call finalize_media_upload to register it and get the hosted publicUrl for schedule_post mediaUrls.
Flow:
prepare_media_upload { filename, contentType, size } -> { key, uploadUrl, publicUrl }
PUT the bytes to uploadUrl, e.g.
curl -X PUT --data-binary @day01.mp4 -H "Content-Type: video/mp4" "<uploadUrl>". Do NOT base64-encode; send raw bytes.finalize_media_upload { key, contentType, size } -> registers the MediaAsset.
Use the publicUrl in schedule_post mediaUrls.
size must be the exact byte size of the file. The uploadUrl expires shortly, so PUT immediately after preparing (prepare/PUT/finalize one file at a time rather than preparing many up front). 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": {
"filename": "<filename>",
"contentType": "<contentType>",
"size": "<size>"
},
"name": "prepare_media_upload"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | Yes | Exact file size in bytes. | |
| filename | Yes | Original filename incl. extension, e.g. "day01.mp4". | |
| contentType | Yes | MIME type of the file, e.g. image/jpeg or video/mp4. Must match the Content-Type you use for the PUT. |