Skip to main content
Glama

Reply to a comment

wp_reply_comment
Destructive

Adds a comment to a WordPress post as the connected user, either as a reply to an existing comment or as a new top-level comment.

Instructions

Add a comment to a post as the connected user: a reply to a comment (parent) or a new top-level comment. Each call adds one, so a repeated call posts it twice. It is saved approved and shows at once wherever the post's comments are public, under the user's display name, with the user's email address stored; WordPress sends none of its new-comment emails. HTML is filtered as in post content. Not checked: whether comments are open, and whether parent exists on that post. Returns {created: true, comment_id}. Needs moderate_comments and the right to edit the post (edit_post), as a reply from the comments screen in wp-admin. Existing comments are approved, held or deleted with wp_moderate_comment and wp_delete_comment.

Input Schema

NameRequiredDescriptionDefault
parentNoId of the comment this replies to; not checked to exist or to belong to post_id. Default 0: a top-level comment.
contentYesComment text; HTML is filtered to what post content allows.
post_idYesId of the post the comment belongs to; for a reply, the post of the parent comment. A post that does not exist is refused.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.7.0

TDQS

A4.9/5.0
Behavior5/5

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

Goes well beyond the annotations: states each call creates a new comment so repeats duplicate (matching idempotentHint=false), that the comment is saved approved and immediately visible, that no WordPress new-comment emails are sent, that the email is stored, and that HTML filtering applies. It also discloses two explicit non-checks (comments open, parent exists) and the return shape '{created: true, comment_id}'.

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?

Dense but front-loaded: the create semantics and duplicate-call warning come first, then visibility/side effects, then limits and permissions, then sibling routing. Every sentence carries distinct information; nothing is padding.

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 write tool with no output schema, the definition covers side effects (no emails, approved state), non-idempotency, permissions, validation gaps, and return value. An agent has everything needed to call it correctly and predict consequences.

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 is 3, but the description adds real meaning the schema only hints at: parent is not validated to exist or belong to post_id, and post_id for a reply must be the parent's post. The content HTML-filtering constraint is repeated rather than extended, keeping it at 4.

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 ('Add a comment to a post as the connected user') and immediately disambiguates the two modes: reply to a parent vs. new top-level comment. An agent can distinguish this from wp_moderate_comment or wp_delete_comment 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?

Explicitly routes the agent: this tool creates, while existing comments are approved/held/deleted with wp_moderate_comment and wp_delete_comment. It also states the permission prerequisite (moderate_comments plus edit_post) and the wp-admin equivalent, so when-to-use and when-not are both covered.

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

Deploy Server

Other Tools