wp_add_media
Upload a media file to WordPress by specifying a local file path, and optionally set its title and alt text for use in posts and pages.
Instructions
Upload a media file to WordPress
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": "wp_add_media"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | Media title | |
| alt_text | No | Alt text for media | |
| file_path | Yes | Path to file to upload |