Prepare an upload (signed URL)
prepare_uploadReserve a single-use signed URL for a heavy upload (a local file).
Five purposes:
purpose='action'— the action itself takes bytes (facebook_ads.image_upload,facebook_insights.photo_upload/video_upload, a custom-audience CSV). Passaction(the SAME ref list_actions/execute_action use) and theaccount_idfromlist_accounts. POSTing the bytes RUNS the action and returns its result. Refused with a hint when the action is URL-only.purpose='public_url'— the action only fetches a URL (Instagrammedia_createimage_url/video_url, any*_urlparam). Passpathas the file name (e.g. 'photo.jpg'); the POST answers with a public, permanentasset_urlto pass to the action. Setconvert_to_jpegin the POST for Instagram images (JPEG only).purpose='report_asset'— an image inside a hosted report bundle; passreport_idandpath.purpose='report_source'— a filepublish_report_spectakes by reference instead of in its arguments: a custom section's TSX (path='Ticker.tsx'), a spec or a JSON patch (.json). POST{"params": {"content": "<text>"}}; the answer'ssource_refgoes incustom_sections_ref/spec_ref/patch_ref(yours alone, 2 h, ≤ 256 KB).purpose='domain_logo'— the brand logo of a connected custom domain (PNG/JPEG ≤ 512 KB; shown as the browser-tab icon and on the sign-in page under that domain). Passhostname(from manage_report_domain list) andpath(the file name, e.g. 'logo.png'). Owner/admin + paid plan. Returns{upload_url, method, headers, expires_in, max_size_bytes, input_schema, how_to_post, next_step}; POST the JSON body toupload_urlfrom a code-execution channel (never through the chat).
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": {
"purpose": "<purpose>"
},
"name": "prepare_upload"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | ||
| action | No | ||
| purpose | Yes | ||
| hostname | No | ||
| connector | No | ||
| report_id | No | ||
| account_id | No | ||
| ttl_seconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||