Skip to main content
Glama

Create a comment or reply

create_comment

Creates a WordPress comment as the configured user, optionally as a reply to a parent comment; holds it for moderation unless status 'approve' is passed.

Instructions

Create a comment, usually a reply to another comment (parent), as the configured WordPress user. WordPress comments have no drafts, so by default the comment is held for moderation and is not shown on the site until approved (update_comment with status 'approve', or in the WordPress admin). Pass status 'approve' to publish it at once. The status is always sent, so the configured user needs the moderate_comments capability (Editor or Administrator role); without it WordPress refuses the comment. WordPress saves a new comment as approved and then sets the requested status within the same request, so plugins that run when a comment is saved may briefly see a held comment as approved. Returns the new comment's ID, post, parent and status.

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": {
      "content": "<content>"
    },
    "name": "create_comment"
  }
}

Input Schema

NameRequiredDescriptionDefault
parentNoID of the comment to reply to
statusNo'hold' (held for moderation, the default) or 'approve' (published at once)hold
contentYesComment text
post_idNoPost or page ID to comment on. Optional when parent is given (the post of the parent comment is used)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.30.0

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare non-read-only, non-destructive, non-idempotent, closed-world behavior, and the description adds genuinely valuable context beyond that: the moderation lifecycle, the moderate_comments capability requirement (Editor/Administrator), and a plugin hook ordering caveat. However, the ordering caveat and the capability gating are described in depth while there is no treatment of repeat-call/idempotency behavior beyond the annotation flag, so the definition is strong but not exhaustive.

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 core action, then layered: default behavior, how to publish, permission requirement, hook caveat, return value. Every sentence carries information, though the single-request status-ordering caveat is dense enough that it slightly slows scanning.

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 4-parameter mutation tool with no output schema, the description covers the moderation default, permission prerequisite, side-effect ordering, and the shape of the return value (ID, post, parent, status). Nothing an agent needs in order to call this correctly is missing.

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 baseline is 3; the description earns above that by clarifying that parent drives post_id ('usually a reply to another comment (parent)') and that status is always transmitted, which explains why the capability is needed. It stops short of explaining field constraints such as content length or nesting depth.

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?

States a specific verb and resource ('Create a comment, usually a reply to another comment') and names the actor ('as the configured WordPress user'), which separates it from update_comment, which it explicitly points to for later approval. An agent can identify the operation without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit context for the key decision: by default the comment is held for moderation, and the agent should pass status 'approve' to publish immediately, or use update_comment with status 'approve' afterwards. It doesn't cover when to prefer this over other creation siblings, but the routing guidance it does give is concrete.

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