List Posts Authored by User
Lists posts authored by a given user, given their user ID. Optional post_type (default "post") and status (default "publish"), paginated. Read-only. For just the count, use mosmcp/get-user-post-count.
| Property | Value |
|---|---|
| Ability slug | mosmcp/list-user-authored-posts |
| Wire tool name | mosmcp__list-user-authored-posts |
| Category | Users & Roles (mosmcp-users) |
| Plan | Free |
Required access
| Requirement | Value |
|---|---|
| Capability | list_users |
| Minimum default role | Administrator (Shop manager too when WooCommerce is active) |
| Annotations | readOnly: true · destructive: false · idempotent: true · openWorld: false |
Input schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| id | integer (min 1) | Yes | — | The author user ID (required). |
| post_type | string | post |
The post type to list. Defaults to "post". | |
| status | string | publish |
The post status to list. Defaults to "publish". | |
| page | integer (min 1) | 1 |
Page number, starting at 1. | |
| per_page | integer (1–100) | 20 |
Posts per page (max 100). |
Output schema
| Field | Type | Required |
|---|---|---|
| posts | object[] | Yes |
| posts[].id | integer | Yes |
| posts[].title | string | Yes |
| posts[].status | string | Yes |
| posts[].type | string | |
| posts[].date | string | |
| posts[].link | string | |
| total | integer | Yes |
| page | integer | Yes |
| per_page | integer | Yes |
Example
Sample prompt
List the published posts written by user #42.
Example request (json)
{
"jsonrpc": "2.0",
"id": 190,
"method": "tools/call",
"params": {
"name": "mosmcp__list-user-authored-posts",
"arguments": {
"input": {
"id": 42,
"per_page": 10
}
}
}
}Example response (json)
{
"jsonrpc": "2.0",
"id": 190,
"result": {
"isError": false,
"structuredContent": {
"posts": [
{
"id": 311,
"title": "Spring Product Roundup",
"status": "publish",
"type": "post",
"date": "2026-04-02 10:00:00",
"link": "https://example.com/spring-product-roundup/"
}
],
"total": 37,
"page": 1,
"per_page": 10
}
}
}
Edge cases / errors
- No user with that id → mosmcp_user_not_found error.
- post_type defaults to "post" and status to "publish"; pass status "draft" to see drafts.
- per_page above 100 → clamped to 100.
- An unknown post_type or status → empty posts with total 0.
| << Previous | Next >> |
|---|---|
| Get User's Roles | List Roles |
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.