Request File Upload
file.request_uploadStart a file upload. Returns a presigned URL — you must then PUT exactly size_bytes bytes of the file to that URL yourself, with Content-Type set to the mime you gave (upload_headers), and finally call file.confirm_upload with the returned key. Images (image/png, image/jpeg, image/webp), a PDF (application/pdf, private only — e.g. a LinkedIn document post) or an MP4 (video/mp4, private only — e.g. a social video), max 10MB. Use visibility: "public" for anything that must load on a website.
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": {
"mime": "<mime>",
"size_bytes": "<size_bytes>"
},
"name": "file.request_upload"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mime | Yes | Content type of the file. One of: image/png, image/jpeg, image/webp, application/pdf (private only), video/mp4 (private only). | |
| size_bytes | Yes | Exact byte length of the file you will upload. The URL is signed for it: a PUT of any other length fails. | |
| visibility | No | `public` is world-readable — use it for blog covers and other web assets. | private |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Pass to file.confirm_upload once the PUT succeeded | |
| upload_url | Yes | Presigned URL to PUT the bytes to | |
| upload_headers | Yes | Headers the PUT must send exactly; the URL is signed for this Content-Type | |
| expires_in_seconds | Yes | Lifetime of the upload URL |