Check and claim
check_and_claimAtomically check whether an action identified by a key was already performed, and claim it if not. Use it before performing a non-idempotent action that may have completed in an earlier attempt (a payment, a message, a write), or when you need to remember something across sessions. Returns 'claimed' if you are first and 'already_done' if not. Do not use it as a general data store or as a result cache.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Stable identifier for the action, e.g. 'invoice-2026-07-A491:pay'. | |
| metadata | No | Small payload returned alongside the claim. Do not include secrets. | |
| ttl_seconds | No | How long the claim lasts, in seconds. Default 86400 (1 day), max 30 days. |