Upload media
wp_media_uploadUpload a local file or sideload a remote URL into a WordPress media library, with optional title, alt text, and filename.
Instructions
Upload a local file to the media library. Provide path, or url to sideload a remote file.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "wp_media_upload"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Remote URL to download then upload | |
| path | No | Local absolute path | |
| title | No | ||
| alt_text | No | ||
| filename | No |