Set Labor Calendar
set_labor_calendarSet a worker's recurring calendar, as the labor resources screen's recurring editor does: the local days it covers (firstDate to lastDate, YYYY-MM-DD, at most 365 days), weekly shift and break windows on the local clock, and dated exceptions (one-off shifts, breaks, absences and authorized overtime, as instants with an offset). It replaces the worker's whole calendar; inside the covered days time not on a shift is off duty, outside them capacity is unknown, and commitments check crews against it. The time zone defaults to the account's. Admin; operator credentials only. Preview first; the in-app assistant gets a confirm card.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"worker": "<worker>",
"firstDate": "<firstDate>",
"lastDate": "<lastDate>"
},
"name": "set_labor_calendar"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| worker | Yes | The worker, by id or full name. | |
| preview | No | Step 1 of the required two-step write: set true to validate and receive a structured preview plus a single-use previewReceipt. Nothing changes until the commit call. | |
| lastDate | Yes | The last local day the calendar covers, YYYY-MM-DD. | |
| timeZone | No | An IANA time zone, e.g. America/Denver; defaults to the account's. | |
| firstDate | Yes | The first local day the calendar covers, YYYY-MM-DD. | |
| exceptions | No | Dated exceptions, at most 500: start and end (ISO 8601 with an offset or Z) and kind (shift, break, absence or overtime). | |
| weeklyWindows | No | Weekly windows, at most 50: day (one weekday, monday … sunday; add a window for each further day), start and end on the local clock (HH:mm; an end at or before the start runs past midnight), and kind (shift, the default, or break). | |
| idempotencyKey | No | Caller-generated idempotency key; required with previewReceipt to commit. | |
| previewReceipt | No | Step 2 of the required two-step write: the receipt returned by the preview call. Supply together with a fresh idempotencyKey to commit; calls without it are refused. | |
| repeatedTimePolicy | No | When the clock repeats an hour (daylight saving ends): earlier (default) or later. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| preview | No | ||
| request | No | ||
| committed | No | ||
| expiresAt | No | ||
| actionItemId | No | ||
| confirmation | No | ||
| correlationId | No | ||
| approvalResult | No | ||
| idempotencyKey | No | ||
| previewReceipt | No | ||
| idempotentReplay | No |