Skip to main content
Glama

WritersLogic verifiable AI agents

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

NameRequiredDescriptionDefault
opYes
tokenNoFencing token from acquire; required for renew and release.
holderNoYour worker id. Required for acquire, renew and release.
resourceYesTask or resource name, e.g. invoice:INV-1009 or deploy:prod.
tenantIdNoRequired for API-key callers (namespaced as key:<tenantId>; keep it unguessable). Ignored when a wallet paid: the payer address is the tenant.
requestIdNoCaller-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).
ttlSecondsNoLease length; default 30.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources