LockMyAction · REST + MCP

Stop AI agents from performing the same action twice.

Retries are normal. Duplicate payments, refunds, emails, orders, and other consequential actions are not. LockMyAction derives a stable identity from structured action arguments and keeps persistent idempotency state outside the model.

The problem

An agent can time out after performing an action and retry because it never received the result. Parallel workers can also race. Model memory is not an atomic lock, so “remember that you already did this” is not enough for consequential operations.

The pattern

1. lock_action("refund-order-82731")
2. If safe_to_execute = true → perform refund
3. complete_action(...)
4. Any retry receives already_completed

What LockMyAction provides

Stable action identity

fingerprint_action derives the same key from equivalent JSON objects without storing or echoing their arguments.

One-call atomic lock

lock_action_intent fingerprints and claims the action before execution. Proceed only when safe_to_execute is true.

Completion and stale-lock protection

Complete or release with the exact returned key and lock ID. A stale lock ID cannot complete a newer lock.

REST + MCP

Use fingerprint_action, lock_action_intent, lock_action, check_action, complete_action, and release_action.

Example use cases: refund processing, payment creation, order submission, outbound email, ticket creation, provisioning, account changes, and any tool where duplicate execution matters.

Use LockMyAction

Common questions

Can the model provide idempotency by itself?

A model can choose a key, but reliable duplicate prevention needs shared persistent state and atomic ownership outside the model.

Does LockMyAction execute the action?

No. It protects the execution decision. Your application still performs the payment, refund, email, order, or other action.