Skip to main content
Glama

Claim an action exactly once

once_key_claim
Idempotent

Atomic idempotency witness. Claims a {namespace, action_key} pair exactly once, so a fleet of agents cannot perform the same side effect twice. Call this BEFORE any non-idempotent action such as sending an email, charging a card, or posting an order. Returns one of: 'claimed' — you won, do the work, then call once_key_complete; 'in_progress' — another agent holds a live lease, wait retry_after seconds and do NOT do the work; 'duplicate' — already done, and the 'result' field carries the original outcome, so use it instead of repeating the work; 'held' — another agent claimed this key, set no lease, and has NOT completed it: there is no result and there may never be one, so do NOT do the work and do NOT treat it as done, because the key stays locked until expires_at; 'conflict' — the same key was claimed with a different payload hash, so your key derivation is wrong. Backed by a strongly consistent Durable Object; this is not something an agent can safely reimplement locally. Costs $0.001 in USDC on Base, paid via the x402 protocol.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ttlNoClaim lifetime in seconds (default 86400)
lease_ttlNoSeconds you have to call once_key_complete before the claim is treated as abandoned and another agent may take it over. Set this if your work could crash partway. Omit it to hold the claim for the full ttl, which guarantees nothing else can ever run the side effect.
namespaceYesIsolation scope, e.g. your application name
action_keyYesStable identifier for the action being claimed
payload_sha256NoOptional hash of the action payload. If it differs from the stored hash, the result is a conflict.
namespace_tokenNoOne-time token issued by the first call that claimed this namespace. Required for every later call.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNoPresent alongside a newly issued namespace_token
resultNoThe recorded result, present when status is 'duplicate'.
statusYes'claimed' means you own the action and must perform it. 'duplicate' means someone already did: do NOT repeat the side effect, use `result` instead.
receiptNoPayment receipt
namespaceNoIsolation scope
action_keyYesThe key that was claimed
claimed_atNoISO-8601 claim time
expires_atNoISO-8601 expiry of the claim record
has_resultNoDistinguishes a recorded null result from no result at all
namespace_tokenNoIssued only on the first claim in a namespace, shown exactly once
lease_expires_atNoCall once_key_complete before this or the claim may be taken over

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already mark the tool as non-readonly, non-destructive, and idempotent, and the description consistently matches. It adds substantial behavioral context: atomicity, strongly consistent Durable Object backing, lease semantics, retry_after/expires_at behavior, cost, and the warning that this cannot be safely reimplemented locally.

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

Conciseness5/5

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

Every sentence carries operational weight: purpose, timing, return-state semantics, infrastructure guarantee, and cost. The most decision-relevant information is front-loaded, and the return-state explanation is compact despite covering five distinct outcomes.

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

Completeness5/5

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

The description is complete for the tool's complexity: it explains when to call it, what each possible result means, what to do next, why it is safe and consistent, and what it costs. With an output schema present, the description appropriately focuses on decision-making context rather than return-value shape.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3. The description adds valuable parameter-related meaning for payload_sha256 and lease_ttl by explaining that a different payload hash triggers a conflict and that 'in_progress'/'held' outcomes correspond to lease behavior. This goes beyond merely restating schema text.

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 states a specific verb and resource: it 'Claims a {namespace, action_key} pair exactly once' as an 'Atomic idempotency witness.' This clearly differentiates it from sibling tools by focusing on the claiming operation and explicitly references once_key_complete for follow-up, so an agent can identify what this tool does and how it differs from related tools.

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?

It gives explicit timing guidance—'Call this BEFORE any non-idempotent action'—and tells the agent exactly what to do on each return state, including not doing work. It does not explicitly mention when to prefer once_key_release or list exclusion conditions, so it narrowly misses full alternative routing.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.4/5.0
Disambiguation5/5

Each tool maps to a distinct resource and action: meetings have import/list/search/get, the once-key system has claim/complete/release, vault has store/retrieve/exists/list/delete/rotate_token, and compress/pdf_parse/scrape are separate utilities. No two tools appear to perform the same side effect, so an agent should not struggle to choose among them.

Naming Consistency5/5

Tools use consistent snake_case and mostly follow a domain_verb pattern (meetings_*, once_key_*, vault_*), with standalone verbs like compress, scrape, and pdf_parse for single utilities. The naming is predictable and easy to extend.

Tool Count4/5

At 16 tools the server is just above the ideal 3-15 range, but the count is justified by six distinct capability clusters. Each tool earns its place, and nothing feels redundant.

Completeness4/5

Core lifecycles are covered well: vault has full CRUD plus token rotation, once-key has claim/complete/release, and meetings provide import/search/get/list. Minor gaps include no meeting update/delete and no direct namespace management, but these are workable rather than blocking.