Skip to main content
Glama

WritersLogic verifiable AI agents

idempotency-registry

Idempotency registry: has key K already been done? Claim it, complete it, read the stored result — Shared memory for side-effecting operations across agents and retries. begin(key) answers proceed (you hold a short claim), wait (another owner is mid-flight), already_completed (returns the stored result pointer), or fingerprint_mismatch (same key, different operation). complete(key) records the result pointer; abandon(key) lets someone retry. The claim expires, so a crashed worker does not block

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>",
      "key": "<key>"
    },
    "name": "idempotency-registry"
  }
}

Input Schema

NameRequiredDescriptionDefault
opYes
keyYesIdempotency key, e.g. refund:ch_123:2026-11-04.
ownerNoWorker id; required for begin, complete and abandon.
resultNocomplete: where the outcome lives (do not store payloads here).
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).
fingerprintNoHash of the operation's identity fields; a later begin with a different fingerprint is refused.
claimSecondsNoHow long a begin claim lasts; default 300.
retentionHoursNoHow long a completed key is remembered; default 24.

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