lease
Short lease with fencing tokens: claim a task for N seconds, renew, release — Lets many agents agree which one works on a task: acquire a named resource for 1-3600 s, renew it while working, release it when done. Every new acquisition returns a strictly larger fencing token; pass it to the downstream store and reject writes carrying a smaller one, so a paused holder whose lease expired cannot clobber its successor. Re-acquiring as the current holder extends the lease with t
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": {
"op": "<op>",
"resource": "<resource>"
},
"name": "lease"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | ||
| token | No | Fencing token from acquire; required for renew and release. | |
| holder | No | Your worker id. Required for acquire, renew and release. | |
| resource | Yes | Task or resource name, e.g. invoice:INV-1009 or deploy:prod. | |
| tenantId | No | Required for API-key callers (namespaced as key:<tenantId>; keep it unguessable). Ignored when a wallet paid: the payer address is the tenant. | |
| requestId | No | Caller-chosen id for this mutation. A retry with the same id and same input returns the stored response (24 h) instead of applying twice; the same id with different input is rejected. Send one on every mutation you may retry: without it a retry is applied again (fleet-memory record appends a duplicate; a repeated spend-ledger commit or release answers NO_HOLD because the first call already took effect). | |
| ttlSeconds | No | Lease length; default 30. |