MCP ServerTool Reference
Get Analytics
Get Analytics MCP tool.
Get Analytics
Live learning analytics by view. Rates are percents excluding withdrawn enrollments (null if none). org_summary: totals; period counts over date_from to date_to (default 30 days). org_trends: enrollments, completions, certificates per UTC day, week or month; active_learners monthly only. courses, paths: per-item counts and rates; course, path add per-module or per-node progress. user_activity: events, newest first. user_engagement: activity totals, engagement_score 0-100.
Contract
| Field | Value |
|---|---|
| Tool name | get_analytics |
| Domain | analytics |
| Required scopes | analytics:read |
| Title | Get analytics |
| Read only hint | true |
| Destructive hint | false |
| Idempotent hint | false |
| Open world hint | false |
| Bulk limit | none |
| Timeout | 15000ms |
| Kill switch key | analytics.get |
| REST siblings | GET /api/public/v1/analytics/organization/summary, GET /api/public/v1/analytics/organization/trends, GET /api/public/v1/analytics/courses, GET /api/public/v1/analytics/courses/{course_id}, GET /api/public/v1/analytics/learning-paths, GET /api/public/v1/analytics/learning-paths/{path_id}, GET /api/public/v1/analytics/users/{user_id}/activity, GET /api/public/v1/analytics/users/{user_id}/engagement |
Input Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100
},
"cursor": {
"type": "string",
"pattern": "^mcp_[a-z0-9]+$"
},
"view": {
"type": "string",
"enum": [
"org_summary",
"org_trends",
"courses",
"course",
"paths",
"path",
"user_activity",
"user_engagement"
]
},
"granularity": {
"type": "string",
"enum": [
"day",
"week",
"month"
]
},
"date_from": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"date_to": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
},
"course_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"path_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"user_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"event_type": {
"type": "string",
"enum": [
"login",
"logout",
"course_start",
"course_view",
"course_complete",
"course_progress",
"content_view",
"scorm_view",
"course_builder_view",
"xapi_view",
"module_complete",
"exam_start",
"exam_submit",
"quiz_start",
"quiz_submit",
"certificate_earned",
"platform_action",
"create_action",
"edit_action",
"delete_action",
"admin_action"
]
}
},
"required": [
"view"
],
"additionalProperties": false
}Output Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"content": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "text"
},
"text": {
"type": "string"
}
},
"required": [
"type",
"text"
],
"additionalProperties": false
}
}
},
"required": [
"content"
],
"additionalProperties": false
}