Get Category


Gets the details of a single post category by its ID: name, slug, description, parent category, and how many posts it contains.

Property Value
Ability slug mosmcp/category-get
Wire tool name mosmcp__category-get
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
id integer (min 1) Yes — The ID of the category to retrieve.

 

Output schema

Field Type Required
id integer Yes
name string Yes
slug string
description string
parent_id integer
parent_name string
post_count integer Yes
edit_url string

 

Example

Sample prompt
How many posts are in category 23?

Example request (json)

{
  "jsonrpc": "2.0",
  "id": 60,
  "method": "tools/call",
  "params": {
    "name": "mosmcp__category-get",
    "arguments": {
      "input": {
        "id": 23
      }
    }
  }
}

Example response (json)

{
  "jsonrpc": "2.0",
  "id": 60,
  "result": {
    "isError": false,
    "structuredContent": {
      "id": 23,
      "name": "Recipes",
      "slug": "recipes",
      "description": "Step-by-step recipes from our kitchen.",
      "parent_id": 5,
      "parent_name": "Food",
      "post_count": 12,
      "edit_url": "https://example.com/wp-admin/term.php?taxonomy=category&tag_ID=23"
    }
  }
}

 

Edge cases / errors

  • id does not exist → refused with category_not_found.
  • Top-level categories return parent_id 0 and an empty parent_name.
  • post_count is WordPress's stored term count (published posts), so drafts may not be reflected.

 


<< Previous Next >>
Find Category (ID by Name / Name by ID) List All Categories

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.