Skip to main content
Glama

Delete a post or page

wp_delete_post
Destructive

Delete a post, page or entry of any post type: into the trash by default, for good with force=true. Trashing also hides its comments; a trashed entry comes back when wp_update_post gives it a status. An entry already in the trash, a media file, and any entry on a site without a trash are refused without force=true, so a repeated call does not delete for good by itself. Deleting for good also removes its revisions, comments, custom fields and term assignments and cannot be undone. Needs the right to delete the entry. Returns {deleted: true, permanent, id}; an unknown id returns a not-found error. Media files are deleted with wp_delete_media. Forwarded by AlphaBridge Connect to the one site this connection reaches.

Input Schema

NameRequiredDescriptionDefault
idYesId of the post, page or entry to delete.
forceNotrue deletes for good instead of trashing. Default false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / force / description
      Previous value: -"Permanently delete instead of trashing."New value: +"true deletes for good instead of trashing. Default false."
    • addedInput schema / properties / id / description
      Added value: +"Id of the post, page or entry to delete."
  2. Added

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Although annotations already mark this as destructive and non-idempotent, the description adds substantial context beyond them: trash behavior, comment hiding, restore path, refusal cases, permanent deletion side effects (revisions, comments, custom fields, term assignments), irreversibility, permission requirement, return shape, not-found behavior, and bridge forwarding. This is unusually complete for a destructive mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense but front-loaded: it states the core action and default trash behavior first, then force deletion, side effects, permissions, and return behavior. Every sentence adds decision-relevant detail for a destructive operation, with no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive two-parameter tool with no output schema, the description covers the critical gaps: default versus permanent behavior, irreversible effects, refusal conditions, permissions, return value, error behavior, and the relevant media alternative. It is complete enough for an agent to call safely and correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents both parameters. The description adds operational meaning to force=true by explaining permanent deletion, side effects, and refusal behavior, and it explains that an unknown id returns a not-found error, which goes beyond the schema's basic descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses the specific verb 'Delete' with the clear resource 'post, page or entry of any post type,' and explicitly distinguishes media deletion by pointing to wp_delete_media. An agent can distinguish it from nearby siblings such as wp_update_post and wp_delete_media from the text alone.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit when-to-use behavior: default trash, permanent deletion only with force=true, restoration via wp_update_post, and refusal conditions for already-trashed entries, media files, or sites without trash. It also names the correct alternative tool for media files, making selection unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources