Post Toolswordpress_delete_post

wordpress_delete_post

Delete a WordPress post (by default, only Respira-created duplicates can be deleted).

wordpress_delete_post

Delete a post. IMPORTANT: By default, this only works on Respira-created duplicates. The force parameter only works if "Allow Direct Editing" is enabled in Respira settings (disabled by default for safety).

Parameters

4 parameters, 1 required.

NameTypeRequiredWhat it is
idnumberyesPost ID
forcebooleannoForce delete even if not a duplicate. Requires confirm_live_edit=true.
confirm_live_editbooleannoOperator confirmation that a force-delete of an original post is intended. The plugin has always required this alongside force=true; before 8.3.7 the delete_post schema did not expose it, and the error asking for it was thrown away with the rest of the response body.
approval_tokenstringnoApproval token from a prior respira_approval_required response (data.approval_request.approval_token). Omit on the first call; re-call with this parameter set to that exact token to confirm and execute. The token is bound to this tool and expires after 10 minutes.

Example call

The smallest valid call, with the required parameters only:

{
  "name": "wordpress_delete_post",
  "arguments": {
    "id": 123
  }
}

Response

{
  "success": true,
  "deleted": true,
  "id": 202
}

What it changes

It removes or overwrites something on the site, so treat it as the careful kind of call. Respira takes a snapshot before the write, and the change can be undone from that snapshot for 90 days. On a page or post the edit lands on a copy first. The live page changes only when a person approves the copy in wp-admin. Calling it twice with the same arguments leaves the site in the same state as calling it once. On a connection set to read-only it is refused with respira_scope_denied.

When it fails

The failures seen most often on real sites in the last 30 days, most common first:

  • respira_wrong_post_type: The ID belongs to a different post type than this tool works on. Use the matching tool, for example the custom post tools for a custom post type.

How long it takes

A typical call takes about 2.1 seconds. 19 in 20 finish within 3.2 seconds. Measured on real sites over the last week, so it includes the site's own hosting.

Availability

Works on any WordPress site, whichever page builder it uses. Available since Respira 1.0.0.

Example Prompts

  • "Delete the duplicate post I just created"
  • "Delete post 202"