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. Forwarded by AlphaBridge Connect to the one site this connection reaches.

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?

Goes well beyond destructiveHint=true: it discloses the two-stage delete model, that force also removes comment meta and promotes replies, that trashing a `note` cascades to reply notes, the required capability (moderate_comments), the return shape, and the not-found error. It even explains that a repeat call escalates to permanent deletion, which is precisely the non-idempotency the annotations hint at.

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?

Front-loads the trash-versus-force distinction in the first clause, then layers exceptions, cascade behavior, permissions, and return value. Dense and mostly efficient, though the second sentence is long and could be split for scanability.

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?

With only two parameters, no output schema, and destructive annotations, this fills every remaining gap: destructive scope, cascade effects, permission requirement, response shape, error behavior, and the AlphaBridge single-site forwarding caveat. 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 baseline is 3; the description earns above that by explaining the consequences of `force` (meta removal, reply promotion) and by enumerating the implicit-force conditions that override the flag entirely. It adds real decision-relevant meaning the schema's 'deletes for good' phrasing does not.

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?

Names a specific verb and resource ('Delete one comment') and immediately distinguishes this from moderation or listing by naming wp_moderate_comment as the sibling for re-approving. An agent can separate it from wp_list_comments, wp_get_comment, and wp_delete_post without opening any schema.

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 states the default behavior (trash) versus `force=true` (permanent), and calls out the exception paths where a non-forced call still deletes permanently (already trashed, spam, trash disabled on the site). It also directs the agent to wp_moderate_comment for the restore case, so when-to-use and when-to-use-something-else are both covered.

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