Upload a small file inline
upload_media_dataFallback for clients that cannot make network calls: uploads a small image, video or audio file sent inline as base64 (3 MB on the hosted server), checks it, and returns a long-lived asset_url plus its media type, size, dimensions and duration. A larger file returns code upload_too_large_inline with max_bytes; use create_upload_url for it.
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": {
"data_base64": "<data_base64>"
},
"name": "upload_media_data"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data_base64 | Yes | The file encoded as base64 (a data: URL prefix is accepted). | |
| content_type | No | Optional declared type. The real type is read from the file itself and must match. |