Skip to main content
Glama

List posts and pages

wp_list_posts
Read-onlyIdempotent

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. Forwarded by AlphaBridge Connect to the one site this connection reaches.

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. Changed15 schema fields changed
    • changedInput schema / properties / author / description
      Previous value: -"Author user id."New value: +"Only entries by this author user id."
    • addedInput schema / properties / order / default
      Added value: +"DESC"
    • changedInput schema / properties / order / description
      Previous value: -"ASC or DESC. Default DESC."New value: +"ASC (in any letter case) or DESC; any other value counts as DESC. Default \"DESC\"."
    • addedInput schema / properties / orderby / default
      Added value: +"date"
    • changedInput schema / properties / orderby / description
      Previous value: -"date, title, modified, menu_order, ID."New value: +"Sort field: date, title, modified, menu_order or ID. Default \"date\"."
    • addedInput schema / properties / page / default
      Added value: +1
    • changedInput schema / properties / page / description
      Previous value: -"Page number. Default 1."New value: +"Page number, starting at 1. Default 1."
    • changedInput schema / properties / parent / description
      Previous value: -"Parent post id."New value: +"Only children of this post id; 0 for top-level entries only."
    • addedInput schema / properties / per_page / default
      Added value: +20
    • changedInput schema / properties / per_page / description
      Previous value: -"Items per page (max 100). Default 20."New value: +"Items per page, 1–100; other values are clamped. Default 20."
    • changedInput schema / properties / search / description
      Previous value: -"Keyword search."New value: +"Keyword search in title, excerpt and content."
    • addedInput schema / properties / status / default
      Added value: +"any"
    • changedInput schema / properties / status / description
      Previous value: -"Post status (publish, draft, pending, private, any). Default \"any\"."New value: +"Post status (publish, draft, pending, private, future, trash, or any: every status except trash, auto-draft and others registered as excluded from search). Default \"any\"."
    • addedInput schema / properties / type / default
      Added value: +"post"
    • changedInput schema / properties / type / description
      Previous value: -"Post type (post, page, any, or a custom type). Default \"post\"."New value: +"Post 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."
  2. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds genuinely new context: edit_posts permission requirement, that only readable entries are returned, that no match yields an empty list, that content is omitted from results, and that AlphaBridge Connect forwards to the single connected site. That is substantive disclosure beyond the structured fields.

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?

It is a single dense paragraph with the core purpose front-loaded and no filler. The return-shape and forwarding clauses are packed tightly, but every sentence carries useful information for an agent.

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 10-parameter read tool with no output schema, the description covers return fields, pagination envelope, omitted content, permission and visibility scoping, and the empty-result case. 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%, so all ten parameters are already documented in the schema, including defaults, clamping and the built_with matching rules. The description only summarizes 'filters, sorting and pagination' without adding per-parameter meaning, so the baseline of 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?

The opening sentence gives a specific verb (List) and resource (posts, pages, any post type) plus the capabilities offered (filters, sorting, pagination). It is clearly separable from wp_get_post (single item with content), wp_search (keyword search), and wp_list_revisions (revisions).

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 explicitly routes to wp_get_post for content and contrasts wp_search as a single keyword search across all searchable types without paging, which tells the agent which to pick. It also states the edit_posts requirement and the read-visibility scoping, but stops short of an explicit 'use this when X, not when Y' exclusion clause.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources