Skip to main content
Glama

List comments

list_comments
Read-only

Retrieve comments from WordPress with filters for post, status, author, and date. Use status 'hold' to view pending moderation or 'spam' for caught spam.

Instructions

List comments with filtering by post, status, author and date. Moderating? Filter status: "hold" for the pending queue or "spam" for what the spam filter caught — both require authentication.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoWhich page of results to return.
postNoOnly comments on this content ID.
typeNoComment type: "comment" (the default WordPress applies), "pingback", "trackback", or a custom type such as "review".
afterNoISO 8601 date.
orderNoSort direction.desc
beforeNoISO 8601 date.
parentNoOnly replies to this comment ID (0 for top-level comments).
searchNoFree-text search term.
statusNoModeration status. Anything other than "approve" requires authentication.
orderbyNoWhich field to sort by.date
site_idNoWhich configured WordPress site to act on. Optional — with a single site configured it is used automatically; with several, the default site is used unless you name one. Run list_sites for valid ids.
per_pageNoHow many results per page.
author_emailNoFilter by commenter email. Administrator only.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv2.0.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / page / maximum
      Added value: +9007199254740991
    • changedInput schema / properties / parent / description
      Previous value: -"Only replies to this comment ID."New value: +"Only replies to this comment ID (0 for top-level comments)."
    • addedInput schema / properties / parent / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / parent / minimum
      Added value: +-9007199254740991
    • addedInput schema / properties / post / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / post / minimum
      Added value: +-9007199254740991
    • addedInput schema / properties / type
      Added value: +{
      +  "description": "Comment type: \"comment\" (the default WordPress applies), \"pingback\", \"trackback\", or a custom type such as \"review\".",
      +  "type": "string"
      +}
  2. First observedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, and the description aligns with them. It adds useful behavioral context beyond the schema by explaining that 'hold' means the pending queue, 'spam' is what the spam filter caught, and both require authentication.

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?

The description is two sentences with no wasted words. The core purpose is front-loaded, and the second sentence delivers targeted moderation guidance exactly where it is most useful.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 13-parameter tool with no required fields and a fully documented schema, the description covers the primary filters and the auth-sensitive moderation statuses. It doesn't describe the return shape, but it's a simple listing operation with no output schema and annotations already conveying the read-only safety profile.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the JSON schema already documents all 13 parameters and their meanings. The description adds little parameter-level value and even uses the looser term 'author' where the schema more precisely names 'author_email.' Baseline 3 is appropriate given the high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource, 'List comments with filtering by post, status, author and date,' which clearly conveys the operation. It is distinguishable from sibling tools like get_comment because it emphasizes a filtered list rather than a single object lookup, though it doesn't explicitly name that alternative.

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

Usage Guidelines3/5

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

The 'Moderating? Filter status...' phrasing gives a concrete use case for the status parameter and flags authentication requirements. However, it does not explicitly say when to prefer this tool over get_comment or moderate_comments, leaving some routing decision to the agent.

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