wp_media_delete
Delete a media item from WordPress, sending it to trash for recovery. Permanent deletion available with explicit confirmation.
Instructions
Delete a media item. Default sends to trash (recoverable). Pass force=true with confirm="DELETE_PERMANENTLY_" to permanently delete (requires MODE=full). Note: WP's native UI offers no trash recovery for media by default — many sites have ATTACHMENT_DEFAULT_TRASH disabled. Verify your site's behavior before relying on the trash.
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": {
"id": "<id>"
},
"name": "wp_media_delete"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| force | No | ||
| confirm | No |