MCPDocumentation
On this page

Operations: planning, absences and cover

Cancel classes (preview)

ops_occurrence_cancel_preview
Two-phase write
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

FieldTypeDescription
occurrence_idstringONE class (otherwise use the range and filters)
date_fromstring
date_tostringMax 62 days
time_fromstring
time_tostring
worker_idinteger
space_idinteger
service_idinteger
location_idintegerCentre (id). Without it: every centre you can see
notesstring
organization_idintegerOptional: can only be the key's organization

Every tool also accepts lang (es | en) for the language of the text answer.

Output

FieldTypeDescription
summaryRequiredstringWhat will change, in the caller's language
effectsRequiredobjectStructured detail of the change: affected people, classes, dates…
confirm_tokenRequiredstringPass it to confirm_action to execute. Single use, 15 minutes, only for this key
expires_atRequiredstringISO time when the token expires
confirm_withRequired"confirm_action"

Examples

Example 1: Cancel everything on 24 December afternoon

Call

JSON
{
  "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)

JSON
{
  "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"
    }
  }
}