List Roles
Lists all roles registered on the site, with each role's display name and full capability list. Read-only. To see only roles you personally may assign, use mosmcp/get-editable-roles.
| Property | Value |
|---|---|
| Ability slug | mosmcp/list-roles |
| Wire tool name | mosmcp__list-roles |
| 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
Takes no input. Send "input": {} (or omit input).
Output schema
| Field | Type | Required |
|---|---|---|
| roles | object[] | Yes |
| roles[].slug | string | Yes |
| roles[].name | string | Yes |
| roles[].capabilities | string[] |
Example
Sample prompt
What user roles exist on my site and what can each one do?
Example request (json)
{
"jsonrpc": "2.0",
"id": 191,
"method": "tools/call",
"params": {
"name": "mosmcp__list-roles",
"arguments": {
"input": {}
}
}
}Example response (json)
{
"jsonrpc": "2.0",
"id": 191,
"result": {
"isError": false,
"structuredContent": {
"roles": [
{
"slug": "editor",
"name": "Editor",
"capabilities": [
"edit_posts",
"edit_others_posts",
"publish_posts",
"moderate_comments"
]
},
{
"slug": "subscriber",
"name": "Subscriber",
"capabilities": [
"read"
]
}
]
}
}
}
Edge cases / errors
- Includes custom roles added by plugins (e.g. WooCommerce's shop_manager and customer).
- Only capabilities set to true are listed; explicitly denied capabilities are left out.
| << Previous | Next >> |
|---|---|
| List Posts Authored by User | List Users |
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.