claim
Acquire an advisory lock on a named resource so other agents wait before shared actions like pushes or file edits; locks auto-expire and should be released when done.
Instructions
Take an exclusive advisory lock on a named resource so other agents know to wait. Use for coordinating shared actions — e.g. resource='push:' before you commit & push, or 'file:src/app.py' while rewriting a file.
Succeeds if the resource is free, expired, or already yours (refreshes it).
Fails (ok=False) if another agent holds it, telling you who and for how long.
The lock auto-expires after ttl_seconds so a crashed agent never deadlocks
the bus. Call release when done. Locks are advisory — agents must honor
them by convention.
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": {
"resource": "<resource>"
},
"name": "claim"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| resource | Yes | ||
| ttl_seconds | No |