Skip to main content
Glama

Moderate a comment

wp_moderate_comment
Destructive

Set the moderation status of one comment: approve marks it approved, hold sets it back to pending, spam marks it as spam, trash moves it to the trash. Returns {moderated: true, comment_id, status}, status being the one asked for: the answer does not confirm that WordPress stored it, and wp_get_comment shows the stored status. Needs moderate_comments and the right to edit this comment (edit_comment), which follows the right to edit its post. Approving shows the comment wherever the post's comments are public, and WordPress may notify the post's author. Where the site's trash is off (EMPTY_TRASH_DAYS 0), trash deletes the comment for good, as in WordPress; every other change can be reversed by a later call. Trashing a top-level note (comment_type note) also trashes its reply notes, and setting the note to approve or hold later does not bring those back. An unknown comment_id returns a not-found error. Deleting outright is done by wp_delete_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>",
      "status": "<status>"
    },
    "name": "wp_moderate_comment"
  }
}

Input Schema

NameRequiredDescriptionDefault
statusYesNew status: approve, hold (pending), spam or trash. Other values are refused.
comment_idYesId of the comment, as wp_list_comments returns it.

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, as wp_list_comments returns it."
    • changedInput schema / properties / status / description
      Previous value: -"approve, hold, spam, trash."New value: +"New status: approve, hold (pending), spam or trash. Other values are refused."
    • addedInput schema / properties / status / enum
      Added value: +[
      +  "approve",
      +  "hold",
      +  "spam",
      +  "trash"
      +]
  2. Added

TDQS

A4.6/5.0
Behavior4/5

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

Adds substantial context beyond the annotations: the return does not confirm WordPress persisted the change, permissions required (moderate_comments plus edit_comment derived from post edit rights), author notification on approve, and the EMPTY_TRASH_DAYS 0 case where trash becomes permanent deletion. Minor gap is that idempotency (annotations say false) and the openWorld/site-forwarding behavior are not elaborated further, but the destructive and reversibility picture is well covered.

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-loaded with the action and status meanings, then layers consequences and permissions. It is dense and a single long block, but every sentence carries operational information; minor cost is the cascade-note and site-forwarding details competing for attention in one paragraph.

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?

No output schema exists, yet the description specifies the return shape ({moderated, comment_id, status}) and its caveat that it does not confirm storage. Combined with permission, reversibility, and cascade consequences, an agent has everything needed to invoke it safely.

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 baseline would be 3; the description nonetheless adds meaning by mapping each enum value to its effect (approve publishes visibility, hold returns to pending) and noting the comment_id comes from wp_list_comments. Slight over-reliance on the schema for comment_id format, but the value effects are explained.

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?

Opens with a specific verb and resource ('Set the moderation status of one comment') and enumerates what each of the four status values does. It explicitly distinguishes itself from wp_get_comment (reads stored status) and wp_delete_comment (deletes outright), so an agent can route correctly without opening schemas.

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?

Names the alternatives and the conditions that select them: use wp_get_comment to confirm the stored status, and wp_delete_comment for outright deletion. It also flags that an unknown comment_id returns not-found, giving a clear negative condition.

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