upload_media
Uploads a base64-encoded file with its filename and MIME type to the Strapi Media Library, returning an ID for referencing the file in content entries.
Instructions
Upload a new file to the Strapi Media Library. Provide the file as base64-encoded data with a filename and MIME type. After uploading, the file can be referenced in content entries via its ID.
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_name": "<file_name>",
"base64_data": "<base64_data>",
"mime_type": "<mime_type>"
},
"name": "upload_media"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_name | Yes | File name with extension, e.g. "photo.jpg" | |
| mime_type | Yes | MIME type, e.g. "image/jpeg", "image/png" | |
| base64_data | Yes | Base64 encoded file content |