Inicio - Documentación - POM AI - 15 MCP - WordPress comment and meta tools - `wp_approve_comment`: approve a comment

wp_approve_comment: approve a comment

Approves one comment, making it publicly visible.

Arguments

Argument Required Meaning
comment_id Yes The comment
dry_run No Report without writing

Permissions

Allow content writes open, and moderate_comments.

It is the one comment action with an outward effect

Spam, trash and delete all remove something. This one publishes — the comment appears on the post immediately, under your site's name, visible to everyone.

That asymmetry is worth holding onto. The three destructive actions are reversible in some form; approving is what puts someone else's words on your site.

Approve by ID, never by criterion

Approve comments 4412, 4415 and 4418.

Not:

Approve the genuine comments.

The second delegates a judgement the assistant cannot make: whether a message is genuine depends on your business, your customers and context an assistant does not have. It will guess, confidently, and publish the result.

Read the queue yourself and name IDs. See wp_get_pending_comments.

What to check before approving

  • Is it addressed to you, or is it generic praise with a link? The second is the commonest spam shape.
  • Does it contain personal data the author would not want public? An order number or a phone number in a public comment is a problem for them, not just for you.
  • Does it make a claim you would not? An approved comment asserting something false about your product sits on your page.
  • Are there links? Approving publishes them.

Reversing an approval

Approving is not irreversible: an approved comment can be moved back to pending or to trash afterwards. But it was public in the meantime, and may have been indexed or emailed to subscribers.

Treat it as reversible-with-consequences rather than freely reversible.

The dry run

dry_run reports the comment ID and the action, without applying it. It does not return the comment's content, so it confirms the argument rather than the decision.

Read the comment first if you have not already.

What it returns

The comment ID and its new status.

After approving

  • Check the comment appears on the post as expected.
  • Purge the cache — comment lists and counts are frequently cached, so an approval can appear not to have worked.

In a batch

Approving several in one session is normal and fine, as long as each ID was chosen by you:

Approve 4412, 4415 and 4418, then show me the resulting statuses.

Writes are capped at 20 per minute, so a large queue is paced regardless.

Common problems

Symptom Cause
The write is refused Content write gate closed
pom_ai_mcp_forbidden No moderate_comments
The comment does not appear Cache not purged
More comments were approved than intended A criterion was delegated instead of IDs
Approving did nothing visible The comment was already approved

Related