Upload Media
upload_mediaUpload a file to a Drupal media library by providing its path; optionally set title, alt text, name, and media type.
Instructions
Upload a file to the media library.
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_path": "<file_path>"
},
"name": "upload_media"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| alt | No | ||
| name | No | ||
| title | No | ||
| file_path | Yes | ||
| media_type | No | image |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||