Upload media
upload_mediaUpload an image or a video (mp4/mov/webm) to the media library, returning a media id for create_post. Each call adds a new asset to this workspace’s private library; nothing already there is replaced, and nothing is posted anywhere. Images are reformatted to the requested publishing format; videos are stored as-is (format/fit are ignored — upload the video pre-edited). Give the file as ONE of: url (preferred when it is already online — the server downloads it from whatever public address you give) or base64 (fallback for small images; avoid for video). For a large local file in production, prefer create_media_upload (direct upload, no base64 through this channel). format: feed_square (1:1), feed_portrait (4:5), landscape (1.91:1), story or reel (9:16), or original (no resize). fit: "cover" crops to fill (default), "contain" fits the whole image and pads.
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": {
"format": "<format>"
},
"name": "upload_media"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fit | No | cover = crop to fill (default), contain = fit + pad | |
| url | No | Public URL to fetch the file from (preferred if already online) | |
| crop | No | How a 'cover' crop chooses what to keep: 'smart' = saliency-based, keeps the subject (default); 'centre' = predictable middle crop, better for posters/screenshots | |
| base64 | No | Base64 file bytes (data URI ok) — fallback for small images; avoid for video | |
| format | Yes | Target format / aspect ratio (images only — videos are stored as-is) | |
| workspaceId | No | Which workspace to act in — an id from list_workspaces. Optional with a single workspace; REQUIRED once there are several, where guessing would mean posting one client's content to another client's accounts. Ask the user which one before publishing. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| note | No | ||
| media | No |