Delete WordPress Media Item
wp_delete_mediaPermanently delete a media item by ID. WordPress REST doesn't support trashing media, so removal is immediate and irreversible.
Instructions
Permanently delete a media item. WP REST does NOT support trashing media; deletion is always permanent.
Args:
id (number): Media item ID. Required.
force (boolean): Default true. False will trigger a WP validation error.
response_format (enum): markdown | json. Default 'markdown'.
Returns: { deleted: true, previous: }
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_delete_media"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Media item ID to delete. | |
| force | No | NOTE: WP REST requires force=true for media — there is no trash for media. Default is true. Setting false will trigger a WP validation error. | |
| response_format | No | Output format: 'markdown' for human-readable, 'json' for machine-readable. | markdown |