Skip to main content
Glama

wp_delete_comment

Delete a WordPress comment by ID. Trashes by default (recoverable); use force=true to permanently remove. Prefer moderation for spam. Dry-run by default.

Instructions

Delete a comment: force=true is PERMANENT; the default trashes it (recoverable).

By default the comment goes to the trash and can be restored from wp-admin - that comes back as action: "trashed", which is a success. With force=true it is erased from the database and nothing here can bring it back. Prefer wp_moderate_comment with 'spam' for spam: it trains the filters, where a delete teaches them nothing. comment_id comes from wp_list_comments. DEFAULTS TO dry_run=true (returns a preview stating which of the two outcomes you would get; deletes nothing). Pass dry_run=false to apply. Requires the REST transport. Prod writes require allow_prod=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
forceNo
dry_runNo
installYes
allow_prodNo
comment_idYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.4.0

TDQS

A4.7/5.0
Behavior5/5

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

Describes the difference between trashing (recoverable) and force-deleting (permanent), explains dry_run behavior with a preview, and warns that force deletion cannot be undone. With no annotations, this full disclosure is essential and well done.

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?

Information is front-loaded with the main action and then details. Slight redundancy (e.g., repeating trash/permanent distinction) but overall well-structured and not excessive.

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?

Covers the primary behaviors and side effects, including dry_run output preview and permanent delete warning. Lacks explicit error-handling or return format details, but for a deletion tool with no output schema, it is sufficiently complete.

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?

Adds meaning to force, dry_run, and comment_id (source from wp_list_comments). Does not explain install or allow_prod in detail, but the overall semantics are significantly enhanced beyond the bare schema.

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?

States clearly it deletes a comment and distinguishes between trash and permanent delete. Also differentiates from wp_moderate_comment for spam handling, making its purpose unambiguous.

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 advises to prefer wp_moderate_comment for spam, explains the dry_run default and allow_prod requirement, and notes the REST transport constraint. Provides clear when-to-use guidance.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ad02/wp-ops-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server