Skip to main content
Glama

Delete a comment

delete_comment
DestructiveIdempotent

Move a WordPress comment to the trash by default, or delete it permanently with force: true; returns the comment ID and whether it was trashed or deleted.

Instructions

Delete a comment. By default it is moved to the trash, where it can be restored in the WordPress admin; with force: true it is deleted permanently and cannot be restored. To only hide a comment, use update_comment with status 'hold' or 'spam' instead. Returns the comment ID and whether it was trashed or deleted.

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": "delete_comment"
  }
}

Input Schema

NameRequiredDescriptionDefault
forceNoDelete permanently instead of moving to the trash
comment_idYesComment ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.30.0

TDQS

A4.9/5.0
Behavior5/5

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

The annotations already declare destructiveHint=true, but the description adds the crucial nuance the annotation cannot convey: the default operation is reversible via the WordPress admin trash, and only force: true is irreversible. It also discloses the return payload (comment ID plus trashed/deleted outcome), which no output schema provides.

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?

Three short sentences, front-loaded with the action and its default behavior, then the escalation condition, then the alternative tool. No filler or repeated wording; every sentence carries decision-relevant information.

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 two-parameter destructive tool with no output schema, the definition covers reversibility, the destructive path, the redirect to a non-destructive sibling, and the return payload. Nothing an agent needs in order to invoke it correctly or 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 both parameters are already documented, and the description largely restates the force semantics. It does add value by spelling out the consequence of force ("cannot be restored"), which sharpens the schema's terse 'Delete permanently instead of moving to the trash', but comment_id receives no added meaning.

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 opens with a specific verb+resource ("Delete a comment") and immediately clarifies the two distinct behaviors behind that verb: trash-by-default versus permanent deletion with force. It also names the sibling tool (update_comment) that serves the superficially similar 'hide a comment' need, so an agent can distinguish this tool from alternatives 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?

It states explicitly when the default applies (recoverable trash), the exact condition that changes behavior (force: true), and routes an agent that only wants to hide a comment to update_comment with status 'hold' or 'spam'. That is when-to-use, when-not-to-use, and the named alternative in one place.

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