Operations: planning, absences and cover
Cancel classes (preview)
- Permission required
ops.planning.edit
When to use it
Prepares cancelling one class or all those in a range (optionally a time slot, instructor, room, activity or centre), like the panel's "Cancel class": returns the list and count (max 200). On confirm they are cancelled and their open cover requests are closed.
Input
| Field | Type | Description |
|---|---|---|
occurrence_id | string | ONE class (otherwise use the range and filters) |
date_from | string | |
date_to | string | Max 62 days |
time_from | string | |
time_to | string | |
worker_id | integer | |
space_id | integer | |
service_id | integer | |
location_id | integer | Centre (id). Without it: every centre you can see |
notes | string | |
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 |
|---|---|---|
summaryRequired | string | What will change, in the caller's language |
effectsRequired | object | Structured detail of the change: affected people, classes, dates… |
confirm_tokenRequired | string | Pass it to confirm_action to execute. Single use, 15 minutes, only for this key |
expires_atRequired | string | ISO time when the token expires |
confirm_withRequired | "confirm_action" |
Examples
Example 1: Cancel everything on 24 December afternoon
Call
{
"name": "ops_occurrence_cancel_preview",
"arguments": {
"date_from": "2026-12-24",
"time_from": "14:00",
"time_to": "22:00"
}
}Equivalent JSON-RPC call (POST /mcp)
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "ops_occurrence_cancel_preview",
"arguments": {
"date_from": "2026-12-24",
"time_from": "14:00",
"time_to": "22:00"
}
}
}