Skip to main content
Glama

idempotency_vault

Prevents duplicate executions and double-spends by atomically locking idempotency keys, caching completed outputs, and releasing failed operations across swarms.

Instructions

    [Cost: $0.0002 USDC on Base & Solana] Atomic idempotency vault & execution deduplication fence.
    Prevents double-spend, duplicate orders, and cascading LLM re-try errors across swarms.

    Actions:
    - 'claim': Atomically lock key or retrieve cached output. Params: key, scope, payload, lock_timeout_seconds, ttl_seconds.
    - 'resolve': Store execution result and mark COMPLETED. Params: key, scope, output, ttl_seconds.
    - 'release': Unlock key immediately on worker error. Params: key, scope, reason.
    - 'status': Free inspection of key state and cached result. Params: key, scope.

    Args:
        action: Vault operation ('claim', 'resolve', 'release', 'status').
        key: Optional explicit idempotency key. If omitted in claim, derived from payload SHA-256.
        scope: Optional namespace scope to isolate swarms.
        payload: Input payload or tool arguments to auto-fingerprint.
        output: Result payload to cache upon task completion.
        lock_timeout_seconds: Lock duration before timeout (default: 60s).
        ttl_seconds: Cache retention duration for completed results (default: 86400s).
        reason: Explanation if releasing lock on failure.
        payment_signature: Optional x402 transaction hash (defaults to developer mock key).
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyNo
scopeNo
actionNoclaim
outputNo
reasonNo
payloadNo
ttl_secondsNo
payment_signatureNo
lock_timeout_secondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.0

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full transparency burden. It discloses atomicity, cost, and key behaviors (locking, caching, release on error). Yet it omits important details like what happens on conflicts, exact return structures for each action, and side effects of payment_signature. It's reasonably transparent but not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is organized with a header line, purpose, actions, then parameter explanations using bullets and bold labels. It front-loads cost and purpose before diving into details. While it is long, the structure makes it scannable and each sentence serves a purpose, though a few param explanations could be tightened.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex multi-action tool with 9 parameters and no output schema, the description covers actions and parameters well but fails to specify return values for each action (e.g., what claim returns when cached, what status returns). Without an output schema, this missing information leaves an agent guessing about response formats. Therefore, completeness is only partial.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and no parameter descriptions exist in the schema, so the description must compensate. It provides thorough explanations for all 9 parameters, including defaults and usage (e.g., key auto-derived from payload SHA-256, lock_timeout default 60s, ttl default 86400s). This adds significant meaning beyond the raw property names.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the tool as an 'Atomic idempotency vault & execution deduplication fence' with explicit actions (claim, resolve, release, status) and a specific purpose: preventing double-spend, duplicate orders, and cascading retry errors. This distinguishes it from sibling tools like scratchpad_lock or circuit_breaker_guard by focusing on deduplication and atomic state management.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use the tool ('to prevent double-spend, duplicate orders, and cascading LLM re-try errors across swarms') and outlines the actions for typical workflows. However, it does not explicitly compare against alternatives or state when not to use it, leaving some inference to the agent. This is a clear usage context but lacks exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.