Skip to main content
Glama

lock_lock_acquire

Acquire a named lock for a given owner with auto-expiry TTL and blocking wait. Returns whether acquired, lock identifier, owner, and waited milliseconds.

Instructions

[lock] Acquire a named lock. owner identifies caller. ttl_s=auto-expire. wait_s=blocking wait. Returns {acquired, lock, owner, waited_ms}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
ownerNo
ttl_sNo
wait_sNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

Without annotations, the description discloses auto-expire and blocking wait, but does not detail behavior on lock already held, timeout, or reentrancy. Basic transparency but lacks edge-case 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 very concise: a header line followed by short, clear explanations of each parameter and the return value. No wasted words, front-loaded, easy to parse.

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

Completeness4/5

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

Given the complexity of a locking tool and the presence of an output schema (mentioned), the description covers the main functional aspects: name, owner, TTL, wait, and return fields. However, it could mention default behavior (e.g., wait_s=0) and failure modes.

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 description coverage is 0%, so the description fully compensates by explaining each parameter: owner (identifies caller), ttl_s (auto-expire), wait_s (blocking wait). It also describes the return object. Adds significant meaning beyond the schema.

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 states the tool acquires a named lock and identifies key parameters (owner, ttl_s, wait_s). It distinguishes itself from siblings like lock_lock_try by mentioning 'blocking wait', making the verb+resource+scope specific.

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

Usage Guidelines3/5

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

The description implies this is the blocking acquire via the 'wait_s' parameter but does not explicitly compare with alternatives like lock_lock_try (non-blocking) or lock_lock_status. Guidance on when to use which is missing.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/0-co/agent-friend'

If you have feedback or need assistance with the MCP directory API, please join our Discord server