Skip to main content
Glama

locks

locks
Read-only

Distributed locks for agents: acquire a named lock with a TTL (atomic, one holder at a time), extend, release or check it. Stops two agents from doing the same job, paying the same invoice or editing the same file. Private to your wallet, or shared through a space string. Costs $0.002 USDC per call (x402).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
spaceNoOptional shared namespace (any secret string): agents using the same space share it. Default: your paying wallet.
tokenNoFrom acquire, for release / extend
actionNoacquire (default), release, extend, status
holderNo
ttl_secondsNo1-86400, default 60

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.5/5.0
Behavior1/5

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

The description promises state-changing operations ('acquire a named lock', 'extend, release') that are atomic and mutually exclusive, while the annotation declares readOnlyHint=true, i.e. the tool does not modify its environment. That is a direct conflict: an agent trusting readOnlyHint could assume acquire/release have no side effects. (Absent the contradiction, the cost disclosure and TTL/atomicity detail would have scored well.)

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?

Four short sentences, front-loaded with the core purpose, each carrying distinct information: operations, use case, privacy scope, and price. No filler and no repetition of the schema.

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 6-parameter, no-output-schema tool, the description covers behavior, scope, and cost but omits what an agent most needs operationally: what acquire returns (a token, only hinted at in the schema), what happens on contention, and what 'status' reports. Combined with the contradictory readOnlyHint, the definition is workable but not complete.

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?

Schema coverage is 67%, and the description adds real meaning for the two semantically loaded fields: TTL on the lock and the wallet-vs-shared 'space string' scope. It does not explain 'token' or 'holder' beyond what the schema already says, and it never clarifies what acquire returns, so it only partially compensates for the coverage gap.

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 names a specific resource (distributed locks) and enumerates the exact operations: acquire, extend, release, check. It is instantly distinguishable from nearby siblings like queue, tasks, schedule, or memory, and the lead phrase 'Distributed locks for agents' sets scope in five words.

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 a concrete motivating context ('Stops two agents from doing the same job, paying the same invoice or editing the same file'), which tells an agent when coordination is warranted. However, it never names an alternative (e.g., queue, tasks, cron) or states when not to use it, so the routing guidance stops short of explicit when/when-not.

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