Inicio - Documentación - POM AI - 10 MCP - workflows - Review and moderate comments

Review and moderate comments

Comment moderation is a good MCP task with one important caveat: comments are written by real people, and an assistant deciding what to publish or delete is making an editorial judgement on your behalf.

The tools

Tool Does
wp_get_comments List comments
wp_get_pending_comments List comments awaiting moderation
wp_approve_comment Approve one
wp_spam_comment Mark as spam
wp_trash_comment Move to trash
wp_delete_comment Delete
wp_create_comment Create a comment

The writes need Allow content writes open and moderate_comments on the acting user.

Start by reading, not acting

List the pending comments with their IDs, authors and content, then stop.

wp_get_pending_comments gives you the queue. Read it yourself before delegating any decision — you will often find the queue is short enough to handle directly.

Let the assistant sort, and you decide

The productive division of labour is the assistant grouping and summarising, you making the calls:

Group the pending comments into obvious spam, probably genuine, and unclear. Do not approve, delete or mark anything.

Summarise the twelve pending comments in one line each.

Then act on the groups yourself, or approve a specific list of IDs.

Approving in bulk

When you have read the queue and want to act:

Approve comments 4412, 4415 and 4418. Do nothing to the others.

Naming IDs is safer than naming a criterion. "Approve the genuine ones" delegates the judgement; a list does not.

Prefer spam and trash over delete

Three destructive options, and they are not equivalent:

  • Spam marks it and feeds your spam filter's learning. Reversible.
  • Trash moves it aside. Reversible.
  • Delete removes it. Not reversible.

Use spam for spam and trash for everything else you want gone. Reserve delete for cases where the content must not remain on the server — abuse, personal data, legal requirement — and understand that it is final.

Mark 4420 and 4421 as spam. Do not delete anything.

Comments containing personal data

A comment can contain a phone number, an address or a customer's order details. Two consequences:

Deletion may be the correct action if someone asks for their data to be removed. That is a request to handle deliberately, following your own procedure, not something to delegate.

The content is transmitted when the assistant reads it. That is inherent to moderation over MCP; be aware of it if your comments routinely contain personal information.

Creating comments

wp_create_comment exists, and it is worth being clear about what it is for: adding a legitimate reply as your site's own account, or restoring something.

Do not use it to generate comments that appear to come from customers. Generated social proof is a misrepresentation, and it is one of the few things in this documentation worth stating as a flat prohibition. See Review AI output responsibly.

After moderating

  • Check the post's comment section on the front end.
  • Purge the cache — comment counts and lists are frequently cached.
  • Confirm the pending queue is now what you expect.

Common problems

Symptom Cause
The write is refused Content write gate closed, or no moderate_comments
More comments were actioned than intended A criterion was delegated rather than a list of IDs
A deleted comment cannot be restored Delete is final; trash is not
The site still shows moderated comments Cache not purged
Spam keeps returning MCP moderation does not replace a spam filter

What this does not replace

MCP moderation acts on the queue. It does not configure comment settings, does not train a spam filter and does not change who may comment. Those are WordPress settings, and comment-related options fall under the separate option write gate. See Update a public setting.

Related