workflow_claim
Atomically claim a workflow for exclusive processing. Only succeeds if the workflow is in 'created' status; otherwise returns a reason for failure.
Instructions
Atomically claim a workflow for this agent.
Only succeeds if the workflow is in 'created' status. If two agents call this concurrently for the same run_id, exactly one will succeed.
After claiming, call workflow_checkpoint() as each step completes. If this agent crashes, use workflow_discover() + workflow_claim() from a replacement agent to resume — the sidecar preserves all checkpoint state.
Returns claimed=False with a reason if the workflow is already taken or does not exist.
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": {
"run_id": "<run_id>",
"agent_id": "<agent_id>"
},
"name": "workflow_claim"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| run_id | Yes | ||
| agent_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reason | No | ||
| run_id | Yes | ||
| claimed | Yes | ||
| agent_id | No |