Plan Labor Operation
plan_labor_operationSave a run's labor draft, as the labor planner screen does: how long the run takes (elapsedMinutes, 1–44640), an optional plannedStart (ISO 8601 with an offset or Z), and the complete list of who attends when (requirements, at most 50: a qualified pool by id or name, an optional named worker from it, the phase, offsetMinutes from the run's start, durationMinutes and crewSize). The list replaces the draft's requirements; an empty list plans unattended time. clear true removes the draft instead. A draft reserves nobody: commit_labor_plan does, and a committed run keeps its commitment until it is committed again or released. Name the run by operationId, or by workOrder and operationCode (list_labor_operations). Admin; operator credentials only. Preview first; the in-app assistant gets a confirm card.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "plan_labor_operation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clear | No | true removes the run's draft instead of saving one. | |
| 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. | |
| workOrder | No | The run's work order number, with operationCode. | |
| operationId | No | The run's operation id (GUID). | |
| plannedStart | No | When the run starts, ISO 8601 with an offset or Z; omit for an unscheduled draft. | |
| requirements | No | The complete attendance list: pool (id or name), optional worker (id or full name), phase (setup, attendedRun or cleanup), offsetMinutes (default 0), durationMinutes and crewSize (default 1). | |
| operationCode | No | The run's operation code, with workOrder. | |
| elapsedMinutes | No | How long the run takes, start to finish, in minutes (1–44640). | |
| 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. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| preview | No | ||
| request | No | ||
| committed | No | ||
| expiresAt | No | ||
| planVersion | No | ||
| actionItemId | No | ||
| confirmation | No | ||
| correlationId | No | ||
| approvalResult | No | ||
| idempotencyKey | No | ||
| previewReceipt | No | ||
| idempotentReplay | No |