MCPDocumentation
On this page

Operations: planning, absences and cover

Close or cancel an absence (preview)

ops_absence_close_preview
Two-phase write
Permission required
ops.absences.approve

When to use it

Prepares closing ("is back"), shortening (last day) or cancelling an absence, like the panel buttons. Shows which classes go back to their instructor. On confirm, cover requests no longer needed are released.

Input

FieldTypeDescription
absence_idRequiredinteger
last_daystringLast day of absence (shortens). Without it: "is back" (closes yesterday)
cancelbooleantrue = cancel the absence entirely (should not have been registered)
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: Jordi is back

Call

JSON
{
  "name": "ops_absence_close_preview",
  "arguments": {
    "absence_id": 55
  }
}

Equivalent JSON-RPC call (POST /mcp)

JSON
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "ops_absence_close_preview",
    "arguments": {
      "absence_id": 55
    }
  }
}