Skip to main content
Glama

List comments

wp_list_comments
Read-onlyIdempotent

List WordPress comments newest first with filters for status, post, and search text; returns paginated comment details for moderation and review.

Instructions

List comments, newest first, optionally filtered by status, post and search text. Returns comments: [{comment_id, post_id, author, content, status, date}]; status is "approved", "unapproved", "spam" or "trash", date is RFC 3339 in site time. Paged with per_page and page; no total count is returned, and a page past the end is empty. Needs moderate_comments. Read-only; wp_get_comment returns one comment with its parent.

Input Schema

NameRequiredDescriptionDefault
pageNoPage number, starting at 1. Default 1.
searchNoText matched against the comment content and the author's name, email, URL and IP.
statusNoapprove (approved), hold (pending), spam, trash or all. Default "all", which covers approved and pending comments, not spam or trash; any other value counts as all.all
post_idNoOnly comments on this post id. Default 0: comments on all posts.
per_pageNoComments per page, 1–100; other values are clamped. Default 20.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.7.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already cover read-only/idempotent/non-destructive, and the description adds genuinely new behavioral facts: pagination with per_page and page, that no total count is returned, that an out-of-range page returns empty, and the required capability moderate_comments. That is exactly the context annotations cannot carry.

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?

Front-loaded with the verb and ordering, then filters, then return shape, then paging caveats, then permission and sibling pointer. Dense but every clause carries 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?

No output schema exists, and the description supplies the return shape verbatim, the date format, the permission requirement, and the pagination edge case. For a paginated read tool, an agent has everything needed to call it and interpret the result.

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 coverage is 100% and the schema documents every parameter's default and clamping. The description does add the domain vocabulary for status values ('approved', 'unapproved', 'spam', 'trash'), but this actually diverges from the schema's approve/hold tokens, so it neither supersedes nor cleanly extends the schema.

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 ('List comments'), adds ordering ('newest first') and the filter dimensions (status, post, search text). This distinguishes it cleanly from wp_get_comment, which it names explicitly as the single-comment alternative.

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?

The closing clause 'wp_get_comment returns one comment with its parent' gives an explicit alternative, and the filter enumeration implies when to use it. It stops short of stating exclusions, e.g. that this is not the tool for moderation or replies (which wp_moderate_comment handles), so it's clear but not fully bidirectional.

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