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. 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.

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.8/5.0
Behavior5/5

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

The description adds substantial behavior beyond annotations: the exact return shape, the caveat that the response does not confirm WordPress stored the change, and the need to verify with wp_get_comment. It also discloses destructive edge cases such as permanent deletion when EMPTY_TRASH_DAYS is 0 and cascade trashing of reply notes, all consistent with destructiveHint=true.

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 description is front-loaded with the core action and status meanings, then layers in caveats and alternatives. It is dense but appropriately sized for a destructive moderation tool, though a few clauses such as the AlphaBridge forwarding note and WordPress asides could be trimmed.

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?

Given the destructive nature, the absence of an output schema, and the need to understand reversibility and side effects, the description is complete. It covers permissions, return behavior, verification, dangerous edge cases, and the sibling tool for deletion.

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 documents both parameters. The description adds meaning beyond the schema by explaining the practical effect of each status value, including visibility, reversibility, and side effects.

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 states a specific verb and resource: setting the moderation status of one comment. It enumerates all four statuses and explicitly distinguishes the tool from wp_delete_comment for outright deletion, so an agent can tell it apart from sibling comment tools.

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 explains what each status does and names alternatives: wp_delete_comment is for outright deletion, and wp_get_comment is for verifying the stored status. It also states the required capability, so the agent knows the prerequisite and when this tool is appropriate.

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