media_undo_replace
Reverts the last file replacement for a WordPress media attachment when can_undo_replace is true. Use it to restore the previous file version after an unintended replace.
Instructions
Undo the last file replace of one attachment (needs edit rights on the attachment). Only possible while can_undo_replace is true in media_get_attachment.
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": {
"site": "<site>",
"id": "<id>"
},
"name": "media_undo_replace"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Attachment id | |
| site | Yes | Site id (see list_sites) |