List Custom Content


Lists items of a custom content type, optionally filtered by status, by a taxonomy term, by parent, or by a search of the title and body.

Property Value
Ability slug mosmcp/cpt-list
Wire tool name mosmcp__cpt-list
Category Custom Content (mosmcp-cpt)
Plan Free

 

Required access

Requirement Value
Capability edit_posts
Minimum default role Contributor
Annotations readOnly: true · destructive: false · idempotent: true · openWorld: false

 

Input schema

Field Type Required Default Description
post_type string (min length 1) Yes — Which custom content type to work with, as reported by the list-types ability — for example "service" or "team_member".
status string — Only items with this status. Omit for everything except trashed items.
search string — Only items whose title or body contains this text.
taxonomy string — Filter by a taxonomy attached to this type. Requires term.
term string — The term to filter by, as a slug, name or ID. Requires taxonomy.
parent_id integer (min 1) — Only direct children of this item, for hierarchical types.
order_by string (one of modified, title) modified Sort by "modified" (default) or "title".
order string (one of ASC, DESC) DESC Sort direction.
per_page integer (1–100) 20 How many items to return.
offset integer (min 0) 0 How many items to skip.

 

Output schema

Field Type Required
post_type string Yes
showing integer Yes
total integer Yes
has_more boolean
items object[] Yes
items[].id integer
items[].title string
items[].status string
items[].slug string
items[].parent_id integer
items[].menu_order integer
items[].modified string
items[].edit_url string

 

Example

Sample prompt
Show me all draft services in the Consulting category.

Example request (json)

{
  "jsonrpc": "2.0",
  "id": 139,
  "method": "tools/call",
  "params": {
    "name": "mosmcp__cpt-list",
    "arguments": {
      "input": {
        "post_type": "service",
        "status": "draft",
        "taxonomy": "service_category",
        "term": "consulting"
      }
    }
  }
}

Example response (json)

{
  "jsonrpc": "2.0",
  "id": 139,
  "result": {
    "isError": false,
    "structuredContent": {
      "post_type": "service",
      "showing": 1,
      "total": 1,
      "has_more": false,
      "items": [
        {
          "id": 42,
          "title": "Strategy Workshop",
          "status": "draft",
          "slug": "strategy-workshop",
          "parent_id": 0,
          "menu_order": 0,
          "modified": "2026-09-20 14:05:00",
          "edit_url": "https://example.com/wp-admin/post.php?post=42&action=edit"
        }
      ]
    }
  }
}

 

Edge cases / errors

  • taxonomy given without term (or vice versa) → incomplete_taxonomy_filter; both are needed.
  • taxonomy not attached to this type → taxonomy_not_on_type, listing the taxonomies it does have.
  • No status → returns publish, draft, pending, future and private items; trashed items are excluded.
  • per_page is capped at 100; use offset with has_more to page through.

 


<< Previous Next >>
Get Custom Content Template List Custom Content Types

For more information about the Secure MCP Server for WordPress plugin, explore the following resources:

Product Overview | Pricing | Try for Free | Documentation

If you have any questions regarding plugin configuration, pricing plans or licensing, please contact us or mail us at aisupport@xecurify.com.