Skip to main content
Glama

Frontman for WordPress

wp_delete_post

Destructive

Deletes a post or page after explicit user confirmation. Check the post type first. Standard posts move to trash by default. Deleting a theme template or part is permanent and requires force=true plus approval for permanent deletion. Use wp_delete_navigation_menu for block navigation. To clear Additional CSS, use wp_update_custom_css.

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_id": "<site_id>",
      "id": "<id>",
      "confirm": "<confirm>"
    },
    "name": "wp_delete_post"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesThe post ID to delete.
forceNoIf true, permanently delete instead of moving to trash. Required for theme templates and parts.
confirmYesMust be true only after the user explicitly confirms deletion.
site_idYesThe connected site's id returned by list_sites. Call list_sites first; do not use a URL or WordPress post ID.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and openWorldHint=true, but the description adds valuable specifics: what gets trashed versus permanently deleted, the need for force=true and approval for theme templates, and the confirmation requirement. It does not cover rate limits or authentication details, so a 4 is appropriate.

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 front-loaded with the core action and confirmation requirement, then flows through conditional behavior and alternatives without any wasted words. Every sentence contributes to correct invocation.

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

Completeness4/5

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

Given the presence of annotations and full schema coverage, the description covers the essential deletion semantics, including trash vs permanent distinction and required confirmation. It omits return format (no output schema exists), but the core guidance is complete for this destructive operation.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all four parameters. The description reinforces force=true for permanent deletion and implies the confirm parameter, but adds little syntax or format beyond what the schema provides.

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 states a specific verb ('Deletes') and resource ('a post or page') and explicitly distinguishes it from siblings by naming wp_delete_navigation_menu and wp_update_custom_css. It also clarifies scope by noting that standard posts move to trash while theme templates are permanent.

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/when-not guidance: use after explicit user confirmation, check post type first, standard posts go to trash, theme templates require force=true and approval. It also names alternatives for navigation menu and Additional CSS.

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.