Skip to main content
Glama

Frontman for WordPress

wp_list_posts

Read-onlyIdempotent

Lists posts, pages, or custom post types with pagination and filtering. Returns stored slugs, which can be empty for drafts or pending posts. Publication applies WordPress core slug rules.

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": {
      "site_id": "<site_id>"
    },
    "name": "wp_list_posts"
  }
}

Input Schema

NameRequiredDescriptionDefault
langNoOptional Polylang language slug to filter posts. Requires active Polylang and a configured language.
pageNoPage number for pagination.
orderNoSort direction.DESC
searchNoSearch query string to filter posts by keyword.
statusNoFilter by post status.publish
orderbyNoField to sort results by.date
site_idYesThe connected site's id returned by list_sites. Call list_sites first; do not use a URL or WordPress post ID.
per_pageNoNumber of results per page (max 100).
post_typeNoPost type slug. Use "page" for pages, or any registered CPT slug.post

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), yet the description still adds real behavioral context: slugs may be empty for drafts or pending posts, and publication follows WordPress core slug rules. These are non-obvious return-value caveats an agent would otherwise trip over.

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?

Three short sentences with the purpose front-loaded, followed by the return-value caveat and the slug rule. No filler and nothing redundant with the schema.

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 read-only list tool with fully documented parameters and no output schema, the description covers purpose plus a key return-value caveat. It could go further by noting the response shape (post objects versus slugs only) or result-count behavior, but it is adequate to call correctly.

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 parameter is already documented in the schema; the description only echoes 'pagination and filtering'. It adds no extra semantics for filters such as status, lang, or post_type, so the baseline of 3 applies.

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?

States a specific verb and resource: 'Lists posts, pages, or custom post types with pagination and filtering.' That clearly separates it from siblings such as wp_list_blocks or wp_list_templates. It does not name a sibling it is not, so it stops short of a 5.

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?

Usage is only implied by the scope statement: an agent can infer this is the tool for enumerating content. There is no explicit when-to-use versus alternatives (for example, versus a single-post fetch or a search tool) and no stated prerequisites beyond the site_id hint carried in the schema.

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.