List Posts in Category
Lists the posts in a given category (including posts in its sub-categories), any status except trash, newest first. Returns at most per_page posts (default 20) plus the total.
| Property | Value |
|---|---|
| Ability slug | mosmcp/category-list-posts |
| Wire tool name | mosmcp__category-list-posts |
| 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. |
| per_page | integer (1–100) | 20 |
Maximum number of posts to return. | |
| offset | integer (min 0) | 0 |
Number of posts to skip, for fetching the next page. |
Output schema
| Field | Type | Required |
|---|---|---|
| showing | integer | Yes |
| total | integer | Yes |
| category_name | string | |
| posts | object[] | Yes |
| posts[].id | integer | Yes |
| posts[].title | string | Yes |
| posts[].status | string | Yes |
| posts[].date | string | |
| posts[].edit_url | string |
Example
Sample prompt
List the posts in the Recipes category.
Example request (json)
{
"jsonrpc": "2.0",
"id": 63,
"method": "tools/call",
"params": {
"name": "mosmcp__category-list-posts",
"arguments": {
"input": {
"id": 23
}
}
}
}Example response (json)
{
"jsonrpc": "2.0",
"id": 63,
"result": {
"isError": false,
"structuredContent": {
"showing": 1,
"total": 12,
"category_name": "Recipes",
"posts": [
{
"id": 101,
"title": "Sourdough Starter Basics",
"status": "publish",
"date": "2026-09-15 08:00:00",
"edit_url": "https://example.com/wp-admin/post.php?post=101&action=edit"
}
]
}
}
}
Edge cases / errors
- id does not exist → refused with category_not_found.
- Includes posts in sub-categories and every status except trash (published, draft, pending, scheduled, private).
- Users who cannot edit others' posts only see their own posts; per_page is capped at 100.
| << Previous | Next >> |
|---|---|
| List Empty Categories | List Sub-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.