List LearnDash Groups
Lists the LearnDash groups on this site, newest first, with each group's status, how many courses it gives access to, how many members and group leaders it has, and its leaders' names. Read-only.
Also known as: LearnDash groups, classes, cohorts, teams, group enrollments.
| Property | Value |
|---|---|
| Ability slug | mosmcp/learndash-list-groups |
| Wire tool name | mosmcp__learndash-list-groups |
| Category | LearnDash (mosmcp-learndash) |
| Plan | Pro |
Required access
| Requirement | Value |
|---|---|
| Capability | manage_options |
| Minimum default role | Administrator |
| Annotations | readOnly: true · destructive: false · idempotent: true · openWorld: false |
Input schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| search | string | — | Optional words matched against the group name. | |
| per_page | integer (1–100) | 20 |
Maximum number of groups to return. | |
| page | integer (min 1) | 1 |
Page number, starting at 1. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| total | integer | Yes | How many match in all, across every page. |
| showing | integer | Yes | How many are in this response. |
| page | integer | ||
| total_pages | integer | ||
| has_more | boolean | Whether another page follows. Ask for it rather than assuming this is everything. | |
| groups | object[] | Yes | |
| groups[].group_id | integer | Yes | |
| groups[].title | string | Yes | |
| groups[].status | string | Yes | |
| groups[].course_ids | integer[] | The courses the group gives access to; long lists are cut short. | |
| groups[].course_count | integer | ||
| groups[].member_count | integer | ||
| groups[].leader_count | integer | ||
| groups[].leaders | string[] | Group leaders' display names; long lists are cut short. | |
| groups[].created_at | string | ||
| groups[].edit_url | string | ||
| notes | string[] |
Example
Sample prompt
List the LearnDash groups on the site with their leaders.
Example request (json)
{
"jsonrpc": "2.0",
"id": 677,
"method": "tools/call",
"params": {
"name": "mosmcp__learndash-list-groups",
"arguments": {
"input": {}
}
}
}Example response (json)
{
"jsonrpc": "2.0",
"id": 677,
"result": {
"isError": false,
"structuredContent": {
"total": 2,
"showing": 2,
"page": 1,
"total_pages": 1,
"has_more": false,
"groups": [
{
"group_id": 610,
"title": "Acme Analysts 2026",
"status": "publish",
"course_ids": [
512,
498
],
"course_count": 2,
"member_count": 24,
"leader_count": 1,
"leaders": [
"Priya Shah"
],
"created_at": "2026-10-20 13:00:00",
"edit_url": "https://example.com/wp-admin/post.php?post=610&action=edit"
},
{
"group_id": 588,
"title": "Spring Cohort",
"status": "draft",
"course_ids": [
498
],
"course_count": 1,
"member_count": 0,
"leader_count": 0,
"leaders": [],
"created_at": "2026-09-01 09:30:00",
"edit_url": "https://example.com/wp-admin/post.php?post=588&action=edit"
}
],
"notes": []
}
}
}
Edge cases / errors
- Draft, pending, scheduled and private groups are listed with published ones; trashed groups are not.
- course_ids and leaders hold at most 50 entries each; course_count and leader_count give the full numbers.
- search matches group titles only. No match → an empty list with a note, not an error.
- LearnDash group functions missing → mosmcp_learndash_api_unavailable.
| << Previous | Next >> |
|---|---|
| List LearnDash Courses | Update LearnDash Course |
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.