Operations: planning, absences and cover
Register an absence (preview)
- 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
| Field | Type | Description |
|---|---|---|
worker_idRequired | integer | |
type_id | integer | |
type_code | string | Or the reason code (vacaciones, it_enfermedad_comun…) |
start_dateRequired | string | |
end_date | string | Default = start_date |
start_time | string | Only some hours (a single day): start |
end_time | string | |
notes | string | |
justification | 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: Jordi off sick from the 24th to the 26th
Call
{
"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)
{
"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"
}
}
}