Skip to main content
Glama

List posts and pages

wp_list_posts
Read-onlyIdempotent

Lists WordPress posts, pages, or any post type with filters, sorting, and pagination, returning IDs, titles, slugs, links, statuses, dates, and page totals.

Instructions

List posts, pages or entries of any post type, with filters, sorting and pagination. Returns items: [{id, type, status, title, slug, link, date, modified, author, parent, excerpt, menu_order}] and pagination {page, per_page, total, total_pages}; content is not included (wp_get_post returns it). Only entries the account may read are listed; no match gives an empty list. Needs edit_posts. Read-only. wp_search runs one keyword search across all searchable post types, without paging.

Input Schema

NameRequiredDescriptionDefault
pageNoPage number, starting at 1. Default 1.
typeNoPost type (post, page, any, or a custom type as wp_get_post_types lists it). Default "post". Revisions are listed only with parent set to a post the account may edit.post
orderNoASC (in any letter case) or DESC; any other value counts as DESC. Default "DESC".DESC
authorNoOnly entries by this author user id.
parentNoOnly children of this post id; 0 for top-level entries only.
searchNoKeyword search in title, excerpt and content.
statusNoPost status (publish, draft, pending, private, future, trash, or any: every status except trash, auto-draft and others registered as excluded from search). Default "any".any
orderbyNoSort field: date, title, modified, menu_order or ID. Default "date".date
per_pageNoItems per page, 1–100; other values are clamped. Default 20.
built_withNoOnly posts built with this page builder: a builder id as wp_get_post names it in built_with (e.g. "elementor", "kadence", "wpbakery"), "any" for every known builder, or "none" for posts without one. Matched by the builder's markers (meta keys, content patterns); each listed item then names the builder found on it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.7.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already cover readOnly/idempotent/non-destructive, and the description still adds real behavioral context: an edit_posts permission requirement, visibility scoping tied to the account, empty-list-on-no-match semantics, and the fact that content is deliberately excluded from results. These are facts an agent cannot obtain from the annotations or schema.

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 purpose, then return shape, then constraints and sibling contrasts — no filler sentences. It is a dense single paragraph, and the inline result-field enumeration is long but earns its place given there is no output schema.

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?

With ten optional parameters and no output schema, the description compensates by spelling out the returned item fields, the pagination envelope, the content exclusion, and the permission requirement. Nothing an agent needs to call this list tool correctly is missing.

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 every one of the ten parameters is already documented in detail, including the built_with matching semantics and per_page clamping. The description only alludes to 'filters, sorting and pagination' generically and adds no parameter-level meaning beyond the schema, so baseline 3 applies.

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 plus the actual scope: 'List posts, pages or entries of any post type, with filters, sorting and pagination.' It then explicitly separates itself from wp_get_post (content retrieval) and wp_search (single keyword search, no paging), so an agent can distinguish it from all three nearest siblings.

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?

It names the alternatives (wp_get_post for content, wp_search for one-off keyword search without paging) and gives the condition that selects them, which is clear routing context. However it never states an explicit 'use this instead when…' rule for the list-vs-search decision, so the agent still has to infer the primary use case for a multi-filter listing.

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