Upload media
wp_upload_mediaAdd a file to the Media Library, either from a public URL that WordPress downloads or from base64 content with a filename. Optional title, description and alt text.
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_upload_media"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| alt | No | ||
| url | No | URL to download the file from. Use this OR base64/filename. | |
| title | No | ||
| base64 | No | Base64-encoded file content. Must be used together with filename. | |
| filename | No | Filename with extension (e.g. photo.jpg). Required when using base64. | |
| description | No |