Operations: planning, absences and cover
Class counts
- Permission required
ops.planning.view
When to use it
How many classes (and hours) in a period grouped by instructor (who actually teaches), activity, room, day or status: who teaches most, how many were cancelled, which days are lighter.
Input
| Field | Type | Description |
|---|---|---|
date_from | string | |
date_to | string | Max 93 days |
group_byRequired | "worker" | "activity" | "space" | "day" | "status" | |
status | "all" | "planned" | "pending_cover" | "substituted" | "cancelled" | |
worker_id | integer | |
service_id | integer | |
space_id | integer | |
location_id | integer | Centre (id). Without it: every centre you can see |
organization_id | integer | Optional: can only be the key's organization |
Every tool also accepts lang (es | en) for the language of the text answer.
Output
| Field | Type | Description |
|---|---|---|
fromRequired | string | |
toRequired | string | |
group_byRequired | string | |
totalRequired | number | |
hoursRequired | number | |
groupsRequired | object[] | |
groups[].keyRequired | string | |
groups[].classesRequired | number | |
groups[].hoursRequired | number |
Examples
Example 1: Classes per instructor this month
Call
{
"name": "ops_stats",
"arguments": {
"date_from": "2026-11-01",
"date_to": "2026-11-30",
"group_by": "worker"
}
}Equivalent JSON-RPC call (POST /mcp)
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "ops_stats",
"arguments": {
"date_from": "2026-11-01",
"date_to": "2026-11-30",
"group_by": "worker"
}
}
}