List Comments Authored by User


Lists comments authored by a given user, given their user ID, paginated. Read-only. For just the count, use mosmcp/get-comment-count-by-user.

Property Value
Ability slug mosmcp/list-user-authored-comments
Wire tool name mosmcp__list-user-authored-comments
Category Comments (mosmcp-comments)
Plan Free

 

Required access

Requirement Value
Capability moderate_comments
Minimum default role Editor
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).
page integer (min 1) 1 Page number, starting at 1.
per_page integer (1–100) 20 Comments per page (max 100).

 

Output schema

Field Type Required
comments object[] Yes
comments[].id integer Yes
comments[].post_id integer Yes
comments[].parent_id integer
comments[].author_name string
comments[].author_email string
comments[].author_url string
comments[].content string Yes
comments[].status string Yes
comments[].date string
page integer Yes
per_page integer Yes

 

Example

Sample prompt
Show me the comments that user 7 has posted.

Example request (json)

{
  "jsonrpc": "2.0",
  "id": 120,
  "method": "tools/call",
  "params": {
    "name": "mosmcp__list-user-authored-comments",
    "arguments": {
      "input": {
        "id": 7,
        "page": 1,
        "per_page": 20
      }
    }
  }
}

Example response (json)

{
  "jsonrpc": "2.0",
  "id": 120,
  "result": {
    "isError": false,
    "structuredContent": {
      "comments": [
        {
          "id": 911,
          "post_id": 42,
          "parent_id": 905,
          "author_name": "Chris Park",
          "author_email": "chris@example.com",
          "author_url": "",
          "content": "Thanks for the quick reply!",
          "status": "approved",
          "date": "2026-09-24 15:30:12"
        }
      ],
      "page": 1,
      "per_page": 20
    }
  }
}

 

Edge cases / errors

  • No user with that id → error mosmcp_user_not_found.
  • Only comments tied to the account by user ID are returned, and only approved or pending ones (WordPress's default) → spam and trashed comments are left out.
  • User has no comments → empty comments array; no total count is returned.
  • per_page capped at 100.

 


<< Previous Next >>
List Approved Comments List Pending Comments

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.