Upload a file to the media library
upload_media_file[Admin] Upload a file to the company's media library and return it, ready to use.
Sends the file (base64) and has it checked: its real type, the codec of a
video, and anything active in an SVG, which is refused rather than cleaned.
The returned file.url is what page blocks, brand logos and font settings take.
The library is public: a file can be reached by anyone with its address.
Switched on per company by JobMojito; while it is off this is refused with 403.
A file too large to pass as an argument goes through start_media_upload and finish_media_upload, for a client that can send a file to an address.
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": {
"file": "<file>",
"file_name": "<file_name>",
"content_type": "<content_type>"
},
"name": "upload_media_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | The file's bytes, base64-encoded. At most 50 MB once decoded. | |
| width | No | Width in pixels of an image or video. | |
| folder | No | Library folder, one level, such as Crew life (list_media_files include_folders=true gives the names). Default: the top. A new name makes the folder. | |
| height | No | Height in pixels of an image or video. | |
| file_name | Yes | Display name in the library, such as team-photo.jpg. No slashes. | |
| llm_model | No | Your model id, e.g. "claude-opus-4-8"; "unknown" if unsure. For analytics. | |
| poster_url | No | For a video: the url of an image already in this company's library, shown before it plays. | |
| merchant_id | No | Only for an account acting for a sub-merchant; omit for your own company. | |
| content_type | Yes | image/jpeg, image/png, image/webp, image/gif, image/avif, image/svg+xml, video/mp4 (H.264 only), audio/mpeg, audio/mp4, audio/x-m4a or font/woff2. | |
| conversation_id | No | The conversation_id this server returned earlier in this conversation, unchanged, including after later user messages. Omit it if you have none. Recorded for the server developer's analytics. | |
| duration_seconds | No | Length of a video or audio file in seconds. | |
| replace_media_id | No | Replace this file instead of adding one. It must be the same kind, and page drafts move to the new address. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| _mcp_instructions | No | Server-issued metadata for this conversation. |