mcp-easy-ai__wp_list_cpt_items
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
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number. Default: 1. | |
| slug | No | Only items with one of these slugs (post_name). | |
| after | No | Only items published on or after this ISO 8601 date-time. | |
| order | No | Sort direction: asc, desc. Default: desc. | desc |
| author | No | Only items by this user ID. Refused when the post type does not support "author". | |
| before | No | Only items published on or before this ISO 8601 date-time. | |
| offset | No | Skip this many matching items. Replaces page: send one or the other. | |
| parent | No | Only children of this item ID (0 = top-level items only). Refused when the post type is not hierarchical. | |
| search | No | Search keyword. | |
| status | No | Status filter. Default: publish. | publish |
| context | No | edit (default): only items you can edit, with raw titles. view: items you can read (published ones for anyone), for callers without edit access. | edit |
| exclude | No | IDs to leave out. Not with include: WordPress ignores an exclusion when include is given. | |
| include | No | Only these IDs (non-empty). With orderby "include", results keep this order. | |
| orderby | No | Sort 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_id | No | Site to run this tool on: 8ef2e52b-bd07-4671-a363-ebe8b480b65c (https://demo.royalplugins.com) | |
| per_page | No | Items per page. Default: 10. | |
| rest_base | Yes | The post type's REST base (e.g. "product", "books"); its post type slug (e.g. "book") is also accepted. | |
| tax_query | No | WP_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_query | No | WP_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_query | No | WP_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_columns | No | Edit 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_password | No | true: only password-protected items; false: only items without a password. | |
| author_exclude | No | User IDs whose items are left out. Refused when the post type does not support "author". | |
| parent_exclude | No | Leave out items whose parent is one of these IDs (0 = top-level items). Hierarchical types only; not with parent, which WordPress lets override it. |