MCPDocumentation
On this page

Operations: planning, absences and cover

Register an absence (preview)

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

When to use it

Prepares an absence as in the panel (Absences → New): checks reason, dates and overlaps, and shows the classes that will become uncovered. On confirm the absence is created and its classes become "uncovered" with a cover request each.

Input

FieldTypeDescription
worker_idRequiredinteger
type_idinteger
type_codestringOr the reason code (vacaciones, it_enfermedad_comun…)
start_dateRequiredstring
end_datestringDefault = start_date
start_timestringOnly some hours (a single day): start
end_timestring
notesstring
justificationstring
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 off sick from the 24th to the 26th

Call

JSON
{
  "name": "ops_absence_preview",
  "arguments": {
    "worker_id": 4,
    "type_code": "it_enfermedad_comun",
    "start_date": "2026-11-24",
    "end_date": "2026-11-26"
  }
}

Equivalent JSON-RPC call (POST /mcp)

JSON
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "ops_absence_preview",
    "arguments": {
      "worker_id": 4,
      "type_code": "it_enfermedad_comun",
      "start_date": "2026-11-24",
      "end_date": "2026-11-26"
    }
  }
}