strapi_upload_media
Upload images to Strapi's media library from a URL with format conversion, quality control, and metadata options; explicit user authorization is required.
Instructions
Upload media to Strapi's media library from a URL with format conversion, quality control, and metadata options. IMPORTANT: This is a write operation that REQUIRES explicit user authorization via the userAuthorized parameter.
Upload Steps
Upload via strapi_upload_media with URL and metadata
Get image ID from response
Link to content using strapi_rest PUT request
Linking Images to Content (Strapi v5)
After upload, use PUT request to link: { "method": "PUT", "endpoint": "api/articles/{documentId}", "body": { "data": { "images": ["imageId"] } }, "userAuthorized": true }
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": {
"server": "<server>",
"url": "<url>"
},
"name": "strapi_upload_media"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL of the image to upload | |
| format | No | Target format for the image. Use 'original' to keep the source format. | original |
| server | Yes | The name of the server to connect to | |
| quality | No | Image quality (1-100). Only applies when converting formats. | |
| metadata | No | ||
| userAuthorized | No | REQUIRED for media upload operations. Client MUST obtain explicit user authorization before setting this to true. |