Skip to main content
Glama

Delete a comment

wp_delete_comment
Destructive

Delete one comment: into the trash by default, for good with force=true, which also removes its meta and moves its replies up a level. A comment already in the trash or marked as spam, and any comment on a site with the trash turned off, is deleted for good even without force, as in WordPress, so a second call on the same comment deletes it for good. Trashing a top-level note (comment_type note) also trashes its reply notes. A trashed comment can be set to approve or hold again with wp_moderate_comment. Returns {deleted: true, comment_id}; an unknown comment_id returns a not-found error. Needs moderate_comments and the right to edit this comment (edit_comment). Forwarded by AlphaBridge Connect to the one site this connection reaches.

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": {
      "comment_id": "<comment_id>"
    },
    "name": "wp_delete_comment"
  }
}

Input Schema

NameRequiredDescriptionDefault
forceNotrue deletes the comment for good instead of moving it to the trash. Default false.
comment_idYesId of the comment to delete.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / comment_id / description
      Added value: +"Id of the comment to delete."
    • addedInput schema / properties / force / default
      Added value: +false
    • addedInput schema / properties / force / description
      Added value: +"true deletes the comment for good instead of moving it to the trash. Default false."
  2. Added

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the destructiveHint annotation, the description discloses what is destroyed (meta removed, replies reparented upward), the cascade for top-level note comments, the irreversibility trap of calling twice on a trashed comment, and required capabilities (moderate_comments, edit_comment). It also states the return payload and the not-found error path.

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

Conciseness4/5

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

The leading sentence front-loads the primary behavior and the extended caveats follow logically; every sentence carries distinct information. It is a dense run-on paragraph, however, and could be broken into bullets for faster scanning.

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 2-parameter destructive mutation with no output schema, the description covers return shape, error case, permission requirements, cascade effects, and the trash-disabled edge case — nothing an agent needs to call it safely is missing.

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 defines both parameters, but the description adds semantics the schema does not: force also deletes meta and re-parents replies, and omitting force may still permanently delete in some states. That extra meaning pushes it above the baseline 3.

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?

"Delete one comment: into the trash by default, for good with force=true" states a precise verb, resource, and the two modes of operation. It is clearly distinguishable from siblings such as wp_delete_post, wp_moderate_comment, and wp_list_comments.

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?

Explicitly tells the agent when the default (trash) applies and when force=true is needed, including the non-obvious case where a second call permanently deletes. It also names the alternative path (wp_moderate_comment to approve/hold a trashed comment), giving both when-to-use and when-to-use-something-else.

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