Skip to main content
Glama

Acquire Lock

lock_acquire

Acquire a mutual-exclusion lock so concurrent agent runs do not double-process the same work. If two runs race, exactly one gets acquired=true plus a release token; the other gets acquired=false with retry_after_ms. Locks auto-expire after ttl_seconds (default 60s, max 3600s), so a crashed run can never wedge the lock. Not reentrant. Use it before processing a shared job, then lock_release when done.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesLock or counter name within the namespace.
namespaceYesYour private namespace. Pick a long unique string; it acts as the access key.
ttl_secondsNoSeconds until the lock auto-expires. Default 60.

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only indicate readOnly=false and idempotent=false, but the description adds rich behavior: exactly one winner under a race, the response shape (acquired true with token, false with retry_after_ms), auto-expiry to avoid wedging, and non-reentrancy. This far exceeds the annotation coverage.

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 a compact four-sentence paragraph that front-loads the purpose and then gives essential behavioral details. Every sentence contributes value—race behavior, expiry, reentrancy, and usage guidance—with no redundancy or filler.

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?

Even without an output schema, the description explains both possible outcomes (acquired=true with token, acquired=false with retry_after_ms) and covers prerequisites, expiry, and usage context. This makes the tool's behavior fully understandable for an agent.

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 fully documents all three parameters with clear descriptions, and the description only repeats ttl_seconds default and max. It does not add new meaning beyond what the schema provides, 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 states the verb 'Acquire' with the resource 'mutual-exclusion lock' and immediately explains its purpose: preventing double-processing. It also distinguishes itself from sibling lock_release by describing the race outcome and the release token flow.

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 explicitly says to use the lock before processing a shared job and to call lock_release when done, giving clear when-to-use context. It also notes non-reentrancy and auto-expiry, though it does not explicitly list when not to use it or name alternative tools like counter_next.

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.2/5.0
Disambiguation5/5

Each tool has a unique, clearly defined purpose (counters, cron, DNS, email, fixtures, webhooks, KV, locks, name checks, regex, timers, timezone, URL checks). There is no functional overlap; even closely related tools like timer_schedule and cron_next are clearly separated by descriptions.

Naming Consistency4/5

The dominant naming pattern is <resource>_<action> (e.g., inbox_create, kv_get, lock_acquire, tz_convert). A few tools deviate, such as counter_next and cron_next (resource_qualifier), fixture_rows (resource_noun), and request_tool (verb_noun), but these are minor and do not obscure the overall pattern.

Tool Count3/5

At 24 tools, the server exceeds the typical 3-15 range, leaning heavy. The tools cover many independent utility categories, each with a minimal set of operations, but the overall count feels slightly excessive for a single server, though it is justified by the broad scope.

Completeness4/5

The server provides complete lifecycles for its functional areas: KV (set/get/list/delete), inbox (create/poll/delete), locks (acquire/release), timers (schedule/status/cancel/verify). Each utility is self-contained, and the request_tool offers a path for extending the surface. No obvious gaps or dead ends within the intended domain.

Resources