Skip to main content
Glama

mcp-easy-ai__wp_list_cpt_items

Read-only

Lists items of any custom post type (CPT) registered with show_in_rest=true. Required: rest_base (e.g. "product", "events", "movies"), or the post_type slug, which is also accepted. wp_get_post_types lists every post type with its slug and rest_base. Optional, each detailed on its property: per_page (default 10, max 100), page or offset, search, status (default publish), include or exclude (not both), slug, author or author_exclude (not both), parent or parent_exclude (not both), after / before, has_password, date_query / tax_query / meta_query (WP_Query clause lists; meta_query needs edit_posts and only keys registered with show_in_rest for the type), orderby (default date), order (default desc), context (edit by default: only items you can edit; view: items you can read, for callers without edit access), raw_columns (edit context only: each item also carries raw, every database column as stored). Returns { items: [{ id, title, status, date, modified, link… Through Royally: its server marks it read-only, so it runs straight away.

Input Schema

NameRequiredDescriptionDefault
pageNoPage number. Default: 1.
slugNoOnly items with one of these slugs (post_name).
afterNoOnly items published on or after this ISO 8601 date-time.
orderNoSort direction: asc, desc. Default: desc.desc
authorNoOnly items by this user ID. Refused when the post type does not support "author".
beforeNoOnly items published on or before this ISO 8601 date-time.
offsetNoSkip this many matching items. Replaces page: send one or the other.
parentNoOnly children of this item ID (0 = top-level items only). Refused when the post type is not hierarchical.
searchNoSearch keyword.
statusNoStatus filter. Default: publish.publish
contextNoedit (default): only items you can edit, with raw titles. view: items you can read (published ones for anyone), for callers without edit access.edit
excludeNoIDs to leave out. Not with include: WordPress ignores an exclusion when include is given.
includeNoOnly these IDs (non-empty). With orderby "include", results keep this order.
orderbyNoSort by: date, id, title, slug, modified, author, parent, include (the order of include), menu_order (types with page-attributes), comment_count, rand, meta_value or meta_value_num (by the first meta_query clause's key; needs meta_query). Default: date.date
site_idNoSite to run this tool on: 8ef2e52b-bd07-4671-a363-ebe8b480b65c (https://demo.royalplugins.com)
per_pageNoItems per page. Default: 10.
rest_baseYesThe post type's REST base (e.g. "product", "books"); its post type slug (e.g. "book") is also accepted.
tax_queryNoWP_Query taxonomy clauses (at most 10, nested 3 levels), joined with AND, e.g. [{"taxonomy": "genre", "field": "slug", "terms": ["drama"]}]. Clause keys: taxonomy (registered for this post type and shown in the REST API), field (term_id, slug, name; default term_id), terms, operator (IN, NOT IN, AND, EXISTS, NOT EXISTS), include_children. For OR, put clauses in one item with "relation": "OR".
date_queryNoWP_Query date clauses (at most 10, nested 3 levels), joined with AND, e.g. [{"after": "2026-01-01", "before": {"year": 2026, "month": 6}}]. Clause keys: after, before, year, month, monthnum, week, w, dayofyear, day, dayofweek, dayofweek_iso, hour, minute, second, inclusive, compare, column (post_date, post_date_gmt, post_modified, post_modified_gmt). For OR, put clauses in one item: {"relation": "OR", "0": {...}, "1": {...}}.
meta_queryNoWP_Query meta clauses (at most 10, nested 3 levels), joined with AND, e.g. [{"key": "price", "value": 10, "compare": ">", "type": "NUMERIC"}]. Clause keys: key (required; a meta key registered with show_in_rest for this post type, the keys wp_get_post_meta shows; plugin-integration SEO keys are refused), value, compare, type. Needs the edit_posts capability, and with a status other than publish also the type's edit_others_posts (private: read_private_posts; any: both). For OR, put clauses in one item with "relation": "OR".
raw_columnsNoEdit context only. Each item also carries raw: every database column as WordPress stores it (ID, post_author, post_date, post_date_gmt — 0000-00-00 00:00:00 for an unscheduled draft —, post_content, post_title, post_excerpt, post_status, comment_status, ping_status, post_password, post_name, to_ping, pinged, post_modified, post_modified_gmt, post_content_filtered, post_parent, guid, menu_order, post_type, post_mime_type, comment_count, filter). Default false.
has_passwordNotrue: only password-protected items; false: only items without a password.
author_excludeNoUser IDs whose items are left out. Refused when the post type does not support "author".
parent_excludeNoLeave out items whose parent is one of these IDs (0 = top-level items). Hierarchical types only; not with parent, which WordPress lets override it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior5/5

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

Goes well beyond the readOnlyHint annotation: discloses capability gating (meta_query needs edit_posts, non-publish statuses need edit_others_posts/read_private_posts), which filters are refused for non-author/non-hierarchical types, and that raw_columns only applies in edit context. The scope-permission detail in 'edit: only items you can edit' vs 'view: items you can read' is exactly the kind of context an agent cannot get from annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The required parameter is correctly front-loaded and the long parameter enumeration is at least ordered by importance. But it is one dense paragraph, and it ends with malformed text ('Returns { items: [{ id, title, status, date, modified, link… Through Royally: its server marks it read-only') that appears truncated and garbled, wasting the most structurally important slot.

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 24-parameter WP_Query-style lister with no output schema, it covers discovery of rest_base, permission gates, filter conflicts, and defaults. The one real gap is the return shape, which is announced then cut off mid-sentence, leaving the agent without a reliable picture of the response payload.

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 every parameter already carries its own description with defaults, limits, and enum values; the prose largely restates that list. It adds marginal value by flagging mutually exclusive pairs and the meta_query permission rule, but not enough to exceed the baseline for a fully documented schema.

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?

Opens with a specific verb+resource and a real scoping constraint: 'Lists items of any custom post type (CPT) registered with show_in_rest=true.' That implicitly separates it from wp_list_posts/wp_list_pages, and it names wp_get_post_types as the way to resolve a slug. It never explicitly names the sibling it replaces for built-in post types, so differentiation is left partly to inference.

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?

Gives concrete guidance on getting the required rest_base ('wp_get_post_types lists every post type with its slug and rest_base') and explains the context choice between edit and view. It states mutual exclusions (include/exclude, parent/parent_exclude) but never says when to prefer this over wp_list_posts or wp_search_posts, so exclusions are absent.

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