Skip to main content
Glama

Check and claim

check_and_claim

Atomically 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

TableJSON Schema
NameRequiredDescriptionDefault
keyYesStable identifier for the action, e.g. 'invoice-2026-07-A491:pay'.
metadataNoSmall payload returned alongside the claim. Do not include secrets.
ttl_secondsNoHow long the claim lasts, in seconds. Default 86400 (1 day), max 30 days.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explains atomicity, return values ('claimed' and 'already_done'), and the intended context. It does not detail error behavior or persistence specifics, but the TTL parameter is documented in the schema.

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?

The description is three sentences long, with the core action stated first, followed by usage context and return values. It is concise, front-loaded, and contains no redundant or filler content.

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?

Despite having no output schema, the description explicitly states the possible return values. Combined with full parameter coverage in the schema and clear usage/anti-usage guidance, the description is complete enough for an agent to select and invoke the tool correctly.

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

Parameters3/5

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

The input schema already covers all three parameters with 100% coverage, including detailed descriptions for 'key', 'metadata', and 'ttl_seconds'. The description adds no parameter-specific information beyond the schema, so the baseline score of 3 is appropriate.

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 uses a specific verb phrase, 'Atomically check whether... and claim it if not', which precisely identifies the tool's function. It clearly distinguishes the tool from its siblings by focusing on idempotency claiming, a unique capability not shared by fetch_structured or request_capability.

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

Usage Guidelines5/5

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

The description explicitly states when to use the tool: 'Use it before performing a non-idempotent action' and gives concrete examples (payment, message, write). It also provides a when-not-to-use directive: 'Do not use it as a general data store or as a result cache.'

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.

Resources