List Empty Categories


Lists post categories that contain no posts — useful for finding categories that could be cleaned up or deleted.

Property Value
Ability slug mosmcp/category-list-empty
Wire tool name mosmcp__category-list-empty
Category Categories (mosmcp-categories)
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
per_page integer (1–100) 20 Maximum number of categories to return.
offset integer (min 0) 0 Number of categories to skip, for fetching the next page.

 

Output schema

Field Type Required
showing integer Yes
total integer Yes
categories object[] Yes
categories[].id integer Yes
categories[].name string Yes
categories[].slug string
categories[].description string
categories[].parent_id integer
categories[].parent_name string
categories[].post_count integer Yes
categories[].edit_url string

 

Example

Sample prompt
Which categories have no posts so I can clean them up?

Example request (json)

{
  "jsonrpc": "2.0",
  "id": 62,
  "method": "tools/call",
  "params": {
    "name": "mosmcp__category-list-empty",
    "arguments": {
      "input": {}
    }
  }
}

Example response (json)

{
  "jsonrpc": "2.0",
  "id": 62,
  "result": {
    "isError": false,
    "structuredContent": {
      "showing": 1,
      "total": 1,
      "categories": [
        {
          "id": 31,
          "name": "Old News",
          "slug": "old-news",
          "description": "",
          "parent_id": 0,
          "parent_name": "",
          "post_count": 0,
          "edit_url": "https://example.com/wp-admin/term.php?taxonomy=category&tag_ID=31"
        }
      ]
    }
  }
}

 

Edge cases / errors

  • Emptiness is based on WordPress's stored post count, so a category holding only drafts may still be listed.
  • No empty categories → empty list with total 0.
  • Ordered by name; per_page is capped at 100 and offset pages through the results.

 


<< Previous Next >>
List All Categories List Posts in Category

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.