Terminate a worker
terminate_workerStop a worker and remove it, freeing its name and slot under the worker limit. Use it when done with a worker or to clear one that has wedged; in-flight runs end as cancelled.
Instructions
Stop a worker and remove it, freeing its name and its place under the worker limit. Call it when you are done with it, or to clear one that has wedged. A run in flight ends as cancelled; results of its runs stay readable with get_run for a while.
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": {
"workerId": "<workerId>"
},
"name": "terminate_worker"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workerId | Yes | The worker (id or name). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workerId | Yes | ||
| closedRuns | Yes | Runs ended by the termination. |