Acquire a lock / lease (free — workspace op)
coord_lockAcquire an exclusive lease on a key so only one agent acts at a time. The lease auto-expires to prevent deadlocks from crashed agents.
Instructions
LOCK: "only one agent does this irreversible thing." Returns a leaseId, or 409 with who holds it. The lease AUTO-EXPIRES after ttlSeconds, so a crashed agent can never deadlock your fleet. Call coord_release when done (or just let it expire).
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": {
"workspaceId": "<workspaceId>",
"key": "<key>"
},
"name": "coord_lock"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | what you are locking, e.g. "deploy" or "wallet:0xabc" | |
| holder | No | who you are — echoed in 409s so debugging works | |
| secret | No | ||
| ttlSeconds | No | ||
| workspaceId | Yes |