strapi_upload_media_from_file
Upload a local file path to Strapi Media Library, optionally linking it to a content entry and field.
Instructions
Create a Strapi Media Library item by uploading a local file path from this machine.
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": {
"filePath": "<filePath>"
},
"name": "strapi_upload_media_from_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Optional related content type UID, for example api::article.article. | |
| field | No | Optional relation field when attaching media to an entry. | |
| refId | No | Optional related entry id/document id depending on Strapi version. | |
| filePath | Yes | Absolute or working-directory-relative file path readable by the MCP server process. | |
| filename | No | Filename to use in Strapi. Defaults to the local basename. | |
| mimeType | No |