Stop Labor Session
stop_labor_sessionStop a running work session and record its time, from its start to now, against the run. In the app, with nothing named, stops the signed-in worker's own session (User role), as their my-work page does. Naming sessionId, or a worker (id or full name) whose running session to stop, stops someone else's session as the labor planner screen does and needs Admin; connectors must name one. A session already stopped is refused. 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": "stop_labor_session"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| worker | No | A worker id (GUID) or full name whose running session to stop. | |
| 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. | |
| sessionId | No | The work session id (GUID), from get_labor_work_day or get_labor_operation. | |
| 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 | ||
| recorded | No | ||
| committed | No | ||
| expiresAt | No | ||
| actionItemId | No | ||
| confirmation | No | ||
| correlationId | No | ||
| approvalResult | No | ||
| idempotencyKey | No | ||
| previewReceipt | No | ||
| idempotentReplay | No |