Custom Post Type Toolswordpress_list_custom_posts

wordpress_list_custom_posts

List posts for a given custom post type with optional filters and pagination.

wordpress_list_custom_posts

List posts of a custom post type.

Parameters

6 parameters, 1 required.

NameTypeRequiredWhat it is
typestringyesPost type name
statusstringnoPost status
searchstringnoSearch term
pagenumbernoPage number
per_pagenumbernoItems per page
includestringnoOptional v2 include CSV

Example call

The smallest valid call, with the required parameters only:

{
  "name": "wordpress_list_custom_posts",
  "arguments": {
    "type": "value"
  }
}

Response

{
  "success": true,
  "type": "product",
  "posts": [
    {
      "id": 3001,
      "title": "Product A",
      "status": "publish"
    }
  ]
}

What it changes

Nothing. It only reads, so there is nothing to approve and nothing to undo.

When it fails

The failures seen most often on real sites in the last 30 days, most common first:

  • respira_post_type_not_found: That post type is not registered on the site. Call wordpress_list_post_types to see the ones that are.
  • respira_unknown_include: The include parameter asked for a part this tool does not return. The error lists the supported values. Use those.
  • respira_scope_denied: The connection is read-only, and this call would write. Use a connection with write access, or switch the site out of read-only in Respira settings.

How long it takes

A typical call takes about 1.7 seconds. 19 in 20 finish within 4.0 seconds. Measured on real sites over the last week, so it includes the site's own hosting.

Availability

Works on any WordPress site, whichever page builder it uses. Available since Respira 1.0.0.

Example Prompts

  • "List products"
  • "List custom posts for type 'portfolio'"
  • "Search products for 'starter'"